vue devtools and hot update

devtools

Google vue development and debugging tools, devtools, can be used in the development environment, in a production environment Tip: Devtools inspection is not avaliable, becase it is in prodction mode;

Vue.config.devtools Configure whether to allow vue-devtools checking code, the default development version is true, the production version is the default false, if necessary, also use vue-devtools in a production environment, you need to

Set Vue.config.devtools = true, be sure after loading vue, immediately sync settings

 

Is there such a log in the development environment:

[HMR] Waiting for update signal from WDS...

Tips from the WDS, is being updated

What is 1 webpack:

webpack is an automated build tools to solve front-end developer in addition to the business development of chores, such as: packaging, converting language, hot update, start the local server, and so on.

Problems associated with this configuration is webpack local server updates and heat build it for us.

What 2 [HRM] is:

It is the Hot Module Replacement shorthand. Module hot update

What 3 [WDS] is:

It is shorthand for the Webpack dev Server. webpack development environment server (local server). So the beginning of the WDS prompt information generated by webpack-dev-server local server,

When start a local service

 

 When the script file command to run npm run dev performed: a time when another webpack-dev-server build / webpack.dev.conf.js

 

 Production environment to remove all log information and debugger information:

plugins add webpack.optimize.UglifyJsPlugin in the build / webpack.prod.conf.js file

 

Guess you like

Origin www.cnblogs.com/xiaofenguo/p/12606454.html
Recommended