django-webpack-loader icon indicating copy to clipboard operation
django-webpack-loader copied to clipboard

should BUNDLE_DIR_NAME also in the staticfiles_dir.

Open sant527 opened this issue 6 years ago • 2 comments

WEBPACK_LOADER = { 'DEFAULT': { 'BUNDLE_DIR_NAME': 'bundles/', 'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'), }, 'DASHBOARD': { 'BUNDLE_DIR_NAME': 'dashboard_bundles/', 'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats-dashboard.json'), } }

why to use 'BUNDLE_DIR_NAME', why cant i put bundles in static/appname/

sant527 avatar Oct 10 '18 04:10 sant527

How to reproduce your issue exactly ?

Can you upload a minimal project to reproduce your issue ?

Thanks

jpic avatar Oct 10 '18 13:10 jpic

@jpic I think @sant527 just wanted to know what BUNDLE_DIR_NAME's root is, as the README doesn't say and because they would like to make it available elsewhere.

But it appears BUNDLE_DIR_NAME indeed is always expected to be in a Django project's overall static directory.

keikoro avatar Apr 27 '20 11:04 keikoro

Update: BUNDLE_DIR_NAME must be mentioned in README or should be handled transparently by the library.

fjsj avatar Nov 29 '23 20:11 fjsj

When changing the output.path, the BUNDLE_DIR_NAME must also be updated. The bundles parent directory must also be in STATICFILES_DIRS if you're serving assets using Django's staticfiles app (which is the default in Django's runserver). Unfortunately this isn't mentioned in the README. We'll fix that.

fjsj avatar Nov 29 '23 20:11 fjsj

Hopefully this is now clearer in README. Closing.

fjsj avatar Dec 01 '23 18:12 fjsj