If you want to use background data, you can use npm run dev to start the local service, and then use a proxy to process the request api link. Reference link: http://vuejs-templates.github.... If you really need real-time compilation, you can learn about nodemon. For example, you can configure scripts in package.json:
--watch turns on the monitoring mode and monitors the src folder. -e configures the file type to be monitored (html, vue, js, less), and build/build.js is the script you want to run. In this way, you can compile in real time using npm run start in the command line
If you want to use background data, you can use npm run dev to start the local service, and then use a proxy to process the request api link. Reference link: http://vuejs-templates.github.... If you really need real-time compilation, you can learn about nodemon. For example, you can configure scripts in package.json:
--watch turns on the monitoring mode and monitors the src folder. -e configures the file type to be monitored (html, vue, js, less), and build/build.js is the script you want to run. In this way, you can compile in real time using npm run start in the command line
webpack --watch
呀,--watch
Parameters are automatically compiled by monitoring file changesnpm run dev
就可以了,这样你在本地启动的服务看到的就是你修改过的,会实时变动。npm run build
It is usually packaged when it is finally uploaded to the server.The answer on Floor 2 is correct!