Transparently use webpack with django
NOTE: Skipped version 1.2.0 to match webpack-bundle-tracker
version
[email protected]
[email protected]
Added support for custom loader classes: https://github.com/owais/django-webpack-loader/#loader_class
Added a new attrs
option to render_budnle
tag and documented webpack_static
tag
New class based loader implementation
Potentially Breaking Changes
This release introduces a new CACHE
setting which when set to true makes the loader cache the contents of the stats files in memory. This means if set to True, the server will have to be restarted every time the stats file contents change or it'll keep serving old, cached URLs. CACHE
defaults to not DEBUG
by default.
Pre-0.2 settings
WEBPACK_LOADER = {
'BUNDLE_DIR_NAME': 'bundles/',
'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json')
}
0.2 settings
WEBPACK_LOADER = {
'DEFAULT': {
'BUNDLE_DIR_NAME': 'bundles/',
'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'),
}
}