Skip to content

Commit b7a7660

Browse files
committed
Updated ReadMe
1 parent f73fc93 commit b7a7660

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
11
# django-webpack-loader
2-
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.)
33

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.
27+
28+
<br>
29+
30+
##### WEBPACK_STATS_FILE
31+
```
32+
WEBPACK_STATS_FILE_PATH = os.path.join(BASE_DIR, 'assets/webpack-stats.json')
33+
```
34+
35+
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.
36+
`
37+
38+
<br>

0 commit comments

Comments
 (0)