RFC: beta.10, Upgrading to webpack 4 + vue-loader 15
See original GitHub issueUpcoming Breaking Changes in beta.10
Node version requirement
As Node 8 becomes the latest LTS, vue-cli-service
and all official plugins now also require a minimum Node version of 8.
Test plugin script/command rename
cli-plugin-unit-jest
andcli-plugin-unit-mocha
now registertest:unit
command and script instead oftest
;cli-plugin-e2e-cypress
now registertest:e2e
with optional--headless
flag instead of “e2e” ande2e:open
;cli-plugin-e2e-nightwatch
now registerstest:e2e
instead ofe2e
Plugin commands and mode
PluginAPI.setMode()
has been removed. Instead, for a plugin to sepcify the default mode for a registered command, the plugins should expose module.exports.defaultModes
in the form of { [commandName]: mode }
.
webpack 4 & vue-loader 15
We are planning to upgrade to webpack 4 + vue-loader 15 in beta.10. This will result in some breaking changes:
webpack
-
Plugins that are not compatible with webpack 4 will no longer be supported.
-
We will using webpack 4’s
optimization.splitChunks
with default automatic strategy instead of currentCommonChunksPlugin
. If you want to tweak the code splitting behavior you’ll need to use webpack 4’s new options.
CSS Configuration
-
css
option will be removed, all CSS-related configurations should be done by tapping into the respective loaders usingchainWebpack
. See how vue-loader 15 is different from previous versions -
CSS extraction will likely behave a bit differently as we will be moving to
mini-css-extract-plugin
. More on this as we migrate.
Build
dll
option will be removed. Webpack 4 should provide good enough perf and the cost of maintaining DLL mode inside Vue CLI is no longer justified.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:101
- Comments:12 (6 by maintainers)
Top GitHub Comments
Is there an ETA for this beta specifically and for the CLI final release in general?
I propose to include #1248 in beta.10 it’s a breaking change since it requires to import the babel polyfill in main.js, but overall ensures a better dev exp.
Could make a PR if we decide so.