Vue Upgrade

Posted on  by admin

vue-cli Upgrade to 5.0.0-rc.1.

️ Migration cannot cover all situations You need to know the specific information of each package . ️ If you encounter setup compilation vue-loader-plugin(node:44156) UnhandledPromiseRejectionWarning: TypeError: The 'compilation' argument must be an instance of Compilation problem , You need to remove yarn.lock File or delete package-loack.json file , And put..

In the project node-modules Package deletion , Reload dependencies .

I won't support it Node8-11 and 13 edition . I won't support it npm5. Abandoning instant prototyping functionalities. vue serve Instead of npm run servevue build Instead of npm run build according to package.json The order of .

If you need to develop independently .vue file Use sfc.vuejs.org/ or vite.new/vue. The bottom has been webpack edition To upgrade to 5,webpack5 There are many changes , Details please see Webpack 5 release (2020-10-10).

️ In addition to internal modifications to custom configurations , There are also areas for local development code to pay attention to . Is no longer supported JSON File naming and export . By default ,webpack5 No longer supported polyfill.

If code depends on the first mock exam module , You will see an error message .polyfill Detailed list of modules .

Fixing the warnings

webpack-dev-server Has gone from v3 Update to v4.

designated plugin

therefore vue.config.js Medium devServer The options have changed significantly . Please check out webpack-dev-server Migration guide for more details . ️ The three most obvious points are as follows . Deleted disableHostCheck Configuration item , Change it to allowedHosts:all. Deleted public、sockHost、sockPath and sockPort Configuration item , Support client.webSocketURL .