Skip to content

anchpop/django-webpack-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-webpack-loader

Get references to your webpack bundles and chunks for use in development. (support for production coming soon.)

Django webpack loader consumes the output generated by webpack-bundle-tracker and lets you use the generated bundles in django.



Configuration

Assuming assets/ is in settings.STATICFILES_DIRS like

STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'assets'), ) 

WEBPACK_BUNDLE_URL
WEBPACK_BUNDLE_URL = STATIC_URL + 'bundles/' 

URL (not path) to the directory that webpack outputs the bundles to. This should correspond to output.path in your webpack config.


WEBPACK_STATS_FILE
WEBPACK_STATS_FILE_PATH = os.path.join(BASE_DIR, 'assets/webpack-stats.json') 

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. `


About

Transparently use webpack with django

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 80.3%
  • JavaScript 13.9%
  • HTML 3.4%
  • Makefile 2.3%
  • CSS 0.1%