Closed ambrons closed 6 years ago
I failed to mention in my initial post that I'm speculating that the reason the i18n comes after the app is that the plugin isn't able to determine that app depends on i18n as they're optional depending on which one you select and only via the vendor package, which the app has a direct dependency on.
Reading over this it seems like a common problem and perhaps should just be baked into the plugin since it dictates that chunks must be used and what it's named already https://github.com/jantimon/html-webpack-plugin/issues/481
Merged thanks
I also did a few additional improvements 73d1d93b436979709413e190596964ac364df1d3
WIP: Without reordering the chunks the application produces the following error after production compile:
That's with the order of the script injects done this way: ./dist/index.html
However if you move
app.*.js
to the end all works as it should.This was done in an effort to fix the same issue in my product after upgrading to webpack v3.x. Which has the same issue.
I looked at the back and forth in https://github.com/globalizejs/globalize/pull/794 And there's a few changes in there and a lot of overlap with what was done there.