Open cyberfly opened 4 years ago
I had the same problem. When you run the command ./node_modules/.bin/webpack, the file webpack-stats.json is created in the assets/bundles folder. So, you should change de folder in the settings.py, e.g.: WEBPACK_LOADER = { 'DEFAULT': { 'BUNDLE_DIR_NAME': 'bundles/', 'STATS_FILE': os.path.join(BASE_DIR, 'assets, bundles', 'webpack-stats.json'), } } But, maybe you will another error (string indices must be integers). It's happen because the alpha version from webpack-bundle-tracker. So, I downgrade version to npm install --save-dev webpack-bundle-tracker@0.4.3. When you run the ./node_modules/.bin/webpack, will be created the file webpack-stats.json the root folder, then is necessary change settings.py, e.g. 'STATS_FILE': os.path.join(BASE_DIR, 'webpack-stats.json'),
More information: https://stackoverflow.com/questions/61125880/exception-value-string-indices-must-be-integers-render-bundle-error-vue-dja
Hi I follow exactly your tutorial, and the webpack-stats.json was generated inside the assets/bundles/webpack-stats.json
I try to preview at browser, and got this error
this is my directory
settings.py
webpack.config.js is located inside project folder root
Can you help me identify what is wrong here?