Skip to main content

Webpack integration for Flask.

Project description

https://img.shields.io/travis/inveniosoftware/flask-webpackext.svg https://img.shields.io/coveralls/inveniosoftware/flask-webpackext.svg https://img.shields.io/github/tag/inveniosoftware/flask-webpackext.svg https://img.shields.io/pypi/dm/flask-webpackext.svg https://img.shields.io/github/license/inveniosoftware/flask-webpackext.svg

Webpack integration for Flask.

Flask-WebpackExt makes it easy to interface with your existing Webpack project from Flask and does not try to manage Webpack for you. Flask-WebpackExt 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. Flask-WebpackExt reads the manifest and makes your compiled assets available in your Jinja templates.

  • CLI for NPM: Flask-WebpackExt provides a Flask CLI so that e.g. flask webpack install will run npm install in your Webpack project. Similarly, flask webpack build will run npm run build.

Optionally you can use Flask-WebpackExt to also:

  • Inject configuration: Flask-WebpackExt will write a config.json into your Webpack project, which you can import in your Webpack configuration. You 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, Flask-WebpackExt can help you dynamically assemble the files into a Webpack project. This is useful if you don’t know until runtime which packages are installed.

Further documentation is available on https://flask-webpackext.readthedocs.io/

Changes

Version 2.1.0 (released 2025-03-28)

  • Take keyword args to projects and pass them to the super constructor

  • Add WEBPACKEXT_NPM_PKG_CLS variable to set the class to use for project.npmpkg

Version 2.0.0 (released 2024-11-28)

  • Project: allows passing allowed_copy_paths to copy assets when building with

    Webpack

  • Package structure update.

  • Added black formatting.

  • Dropped Python 3.6 support.

Version 1.0.2 (released 2020-05-13)

  • Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0

  • Set Sphinx <3 because of errors related to application context

  • Stop using example app

Version 1.0.1 (released 2018-12-14)

  • Pypi classifier and deployment configuration

  • License detection

Version 0.1.0 (released 2016-05-29)

  • Initial public release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_webpackext-2.1.0.tar.gz (25.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flask_webpackext-2.1.0-py2.py3-none-any.whl (15.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file flask_webpackext-2.1.0.tar.gz.

File metadata

  • Download URL: flask_webpackext-2.1.0.tar.gz
  • Upload date:
  • Size: 25.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flask_webpackext-2.1.0.tar.gz
Algorithm Hash digest
SHA256 89ab631f3c3744e2bbd8cdd088249806e680f66b0bd6b7b972c2de93304706f5
MD5 89c374294596cc921bdd9a46212c2ec2
BLAKE2b-256 f6b443fcb72a19ee53ee04b6c922633152e38eedc433745a537439ed520ec548

See more details on using hashes here.

File details

Details for the file flask_webpackext-2.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for flask_webpackext-2.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8183d316b205d5ce6bb4212e399c17c085d40b28193af9525161d119a6cf6cc4
MD5 ecc8e434a2124c428dea6f69bf7c4d69
BLAKE2b-256 9fa1ea664d8510223f214e4cc8ad376066e9b0392bc728d2d212c6c2495663da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page