Chunk file Issues when using load balancers and Webpack #19517
Unanswered
cuartas1515
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'll share my whole webpack.config.js file shortly, my issue is this:
We have a server and a mirror server that serves as a load balancer, in both servers we run npm run production to compile the code and such, the issue is, that doing it in chunks brings the issue that in one server a chunk file named 1560.js is 1496.js in the other server, so in cases where the balancer is used in the middle of merging the chunks, the first server instruct to merge certain named files that won't find in the other server so I get the error:
I don't want to get rid of chunk merging because it's gonna take an eternity to build otherwise, I'm not too versed on webpack, just made this to make Vue work with codeigniter 3 but I'm pretty sure there's a lot of fixes and optimizations I can do here.
Speaking of optimizations, npm run build takes 2.5 minutes in my machine the first run, even more for my team depending on how fast the machine and drive are, and npm run production takes up to 20 freaking minutes on the servers, so yeah, I really need to find out how to speed up this. Hopefully someone can help me out with this.
Thanks in advance!
This is the webpack.config.js file:
Beta Was this translation helpful? Give feedback.
All reactions