Closed edmorley closed 6 years ago
:clap: That sounds like a great plan!
Vet all of our deps to see if there are any that don't yet support webpack 4
I haven't checked all the deps yet, but one that is definitely not ready yet is: webpack-contrib/extract-text-webpack-plugin#701 (there is an alpha, but judging by other issues filed in that repo, is still buggy)
The future is https://github.com/webpack-contrib/mini-css-extract-plugin extract-text-webpack-plugin is (about to be) deprecated
- Review/merge any open non-breaking-change PRs (including those from Renovate)
- Publish a new Neutrino 8.x release and make sure the release/v8 branch is updated
These two are now done (8.2.0 just published), so barring any objections I'll start merging breaking changes into master (with master now being treated as 9 alpha).
I've started working on this locally. Changes so far:
packages/chunk/*
and the use of ModuleConcatenationPlugin
, since the new webpack chunk/production optimizations options make them redundantNODE_ENV
config entry from the env
preset, since webpack 4 now sets defines it by default (this kind of makes the env
preset overkill vs just using the plugin directly, but presumably we should keep it around for now)Left to do:
optimization.splitChunks.chunks: "all"
(since it's superior to the webpack 4 default; they didn't want to break certain use-cases that don't affect us)html-template
so it handles the new webpack 4 chunking options@eliperelman, what are your thoughts on how Neutrino should handle the new mode
option? eg:
neutrino.config.mode(process.env.NODE_ENV === 'production' ? 'production' : 'development')
NODE_ENV
?Oh and I guess we need to warn people against continuing to use the vendor
entrypoint (since the new webpack splitchunks
handles this). Options:
I'm leaning towards the fail early option.
what are your thoughts on how Neutrino should handle the new
mode
option?
This first option sounds like the right way, even though it can lead to duplication. So each high-level project preset would need to set it:
web
node
I think those are the only ones where we would need to set it.
fail early with an appropriate error
Are there any valid use cases where vendor
may still be used by someone, even when taking split chunks into consideration?
have it be handled by the neutrino API instead
What I am really trying to avoid with this approach is the need for the CLI/API to add its own middleware.
There's now PR #809 open to update Neutrino to webpack 4 - if anyone subscribed to this issue has 20 minutes to try it out, the feedback would be really useful :-)
Webpack 4 has now been released. Whilst their docs have not yet been updated (eg webpack/webpack.js.org#1856 and friends) - it would be good to start looking at what we need to do to support webpack 4 soon.
I propose something like:
release/v8
branch is updatedmaster
to be Neutrino 9 dev/alpha/whatever, making it ok for breaking changes (we can still ship urgent Neutrino 8.x bugfix releases later, but from the release branch)Anything I've missed? :-)