Skip to content

ppanero/pywebpack

 
 

Repository files navigation

PyWebpack

Webpack integration layer for Python.

Using Flask? Check out Flask-WebpackExt.

PyWebpack makes it easy to interface with your existing Webpack project and does not try to manage Webpack for you. PyWebpack does this via:

  • Manifests: You tell Webpack to write a manifest.json using plugins such as webpack-manifest-plugin, webpack-yam-plugin or webpack-bundle-tracker. PyWebpack reads the manifest and makes your compiled assets available to your template engine such as Jinja.
  • API for NPM: PyWebpack provides an API so that e.g. project.install() will run npm install in your Webpack project.

Optionally you can use PyWebpack to also:

  • Inject configuration: PyWebpack will write a config.json into your webpack project, which you can import in your webpack configuration. You can define what goes in the config e.g. let webpack know about output paths or dynamic entry points.
  • Collect bundles: If your Webpack project is spread over multiple Python packages, PyWebpack can help you dynamically assemble the files into a Webpack project. This is useful if you don't know until build time which packages are installed.

Further documentation is available on https://pywebpack.readthedocs.io/

About

Webpack integration layer for Python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.5%
  • Other 1.5%