So my React Lazy setup works great, I use Laravel Mix instead of the normale Webpack config. But after running, the (named) chunks are all put in the public folder, instead of the public/js folder. The site works great, but just for organization I would love it if the chunked js files are in a separate js folder as the public folder will get crowded with all the chunks. Anyone know the answer? :)
Asked
Active
Viewed 361 times
0
-
Sorry, can you share config laravel mix for React Lazy – DevinE Dec 03 '21 at 09:27
1 Answers
0
Wow. The answer was soooo easy. In Webpack.mix.js set the directory alongside the chunk name!
output: {
chunkFilename: "js/[name].js",
},

Ramon
- 1
- 1