0

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? :)

Ramon
  • 1
  • 1

1 Answers1

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