Skip to content

RFC: beta.10, Upgrading to webpack 4 + vue-loader 15 #1205

Closed
@yyx990803

Description

@yyx990803

Upcoming 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 and cli-plugin-unit-mocha now register test:unit command and script instead of test;
  • cli-plugin-e2e-cypress now register test:e2e with optional --headless flag instead of "e2e" and
    e2e:open;
  • cli-plugin-e2e-nightwatch now registers test:e2e instead of e2e

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 current CommonChunksPlugin. 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 using chainWebpack. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions