You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get references to your webpack bundles and chunks for use in development. (suppoer for production coming soon.)
2
+
Get references to your webpack bundles and chunks for use in development. (support for production coming soon.)
3
3
4
+
5
+
Django webpack loader consumes the output generated by [webpack-bundle-tracker](https://github.com/owais/webpack-bundle-tracker) and lets you use the generated bundles in django.
6
+
7
+
8
+
9
+
<br><br>
10
+
### Configuration
11
+
12
+
Assuming `assets/` is in `settings.STATICFILES_DIRS` like
13
+
```
14
+
STATICFILES_DIRS = (
15
+
os.path.join(BASE_DIR, 'assets'),
16
+
)
17
+
```
18
+
19
+
<br>
20
+
21
+
##### WEBPACK_BUNDLE_URL
22
+
```
23
+
WEBPACK_BUNDLE_URL = STATIC_URL + 'bundles/'
24
+
```
25
+
26
+
URL (not path) to the directory that webpack outputs the bundles to. This should correspond to `output.path` in your webpack config.
PATH (not url) to the `webpack-stats.json` file. This corresponds to `filename` in `new BundleTracker({filename: './assets/webpack-stats.json'})` from your webpack config.
0 commit comments