Setup¶
Configuration¶
Webpack¶
django-easywebpack requires the webpack-manifest-plugin.
To configure it, install webpack-manifest-plugin with yarn or npm:
$ yarn add webpack-manifest-plugin
Add webpack-manifest-plugin into webpack.config.js
:
var ManifestPlugin = require('webpack-manifest-plugin');
const config = {
...
plugins: [
new ManifestPlugin()
]
...
}
Django¶
To use django-easywebpack, add it to your INSTALLED_APPS:
Note:'easywebpack'
must be placed before the staticfiles app for the management commands to work properly.
INSTALLED_APPS = (
'easywebpack',
...
)
Then, configure it in your Django settings:
EASYWEBPACK = {
'MANIFEST': 'path/to/manifest.json',
}