-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to webpack 4 and integrate automatic vendor code splitting #3878
Comments
I'm gonna see what I can do about it |
Thank you! |
@Ayc0 lets talk about it here instead. Im thinking lets try to get webpack 4 and new split chunk plugin working first, then we can look at loading some libs from cdn. Anyway we are semi-blocked from using webpack 4 alpha until this is resolved: jantimon/html-webpack-plugin#816 |
Initial stab. I think i got the overlay building with webpack4 (it has less plugins and loaders so i thought it was a good starting place) https://github.com/andriijas/create-react-app/tree/webpack4 the template wont boot, even if i remove all plugins there seems to be some can not read context of undefined error on the entrypoints. |
I'm waiting for webpack 4 to be released, or at least a stable alpha/beta For the specs, I want to add a vendors.json file that allows users to add multiple vendors in different chunks with this syntax: ["moduleA", "moduleB"] resulting in vendors.xxx.js [
["moduleA", "moduleB"],
["moduleC", "moduleD"]
] resulting in vendor0.xxx.js and vendor1.xxx.js And {
"vendor_a": ["moduleA", "moduleB"],
"vendor_b": ["moduleC", "moduleD"]
} resulting in vendor_a.xxx.js and vendor_b.xxx.js |
I don't think that the CDN should be included in this PR because we can just use the |
And, as we also want to improve the long term caching, we need to use the name plugin (I think it changed to in webpack 4, not sure...) |
and also, I want to activate the |
@Ayc0 I read this was the last version before stable, so you should be able to start playing with it |
https://github.com/webpack/webpack/releases/tag/v4.0.0-beta.0 has been released 🎉 |
Gotta go fast 😁 |
Early work: https://github.com/andriijas/create-react-app/tree/webpack4 Current status (updated 2018/02/22)
Blockers
Resources: |
Repo: https://github.com/andriijas/create-react-app/tree/webpack4 Current status - updated 2018/02/22Successful builds with webpack 4!Note: precache plugin, manifest plugin directly from git branches of pending PRs Note: Using html-webpack-plugin directly from git, maintainer of repo of grid/on vacation How to get it running: yarn start/yarn run build Call for helpCallbacks seems to have been removed from new webpack plugin API, anyone who know how to handle that in migration of plugins? Thinking of ModuleScopePlugin/InterpolateHtmlPlugin and WatchMissingNodeModulesPlugin Im going to become the "webpack go-to guy" at work 😭 |
Will this allow us to have a separate vendor bundle once it drops for for react-scripts? |
I think it will make most sense to first bring in webpack 4 and then look at how to bundle vendor scripts. @Ayc0 have experience with it and can hopefully help out once we get webpack 4 in. |
@Ayc0 Hi, Webpack 4.0.0 is here! https://github.com/webpack/webpack/releases/tag/v4.0.0 |
https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693
webpack/webpack#6341
Since we're going to keep 2.x in alpha stage for at least a month or two as we wait for Babel 7 to get stable, we might as well jump straight to webpack 4.
@Ayc0 Seeing that you worked on #3145 and feel passionate about solving this, would you like to work on this?
The text was updated successfully, but these errors were encountered: