Simple directory structure:
| -index.html
| -main.js entry file
| -App.vue vue documents, the official recommendation nomenclature
| -package.json project file (the project dependencies, name, configuration)
npm generate the init --yes
| -webpack.config.js webpack profile
ES6: modular development
export module:
Export default {}
introduction module:
Import module name from the address
------------------------------ --------------
webpak preparations:
CNPM install WebPACK --save-dev
CNPM install WebPACK-dev-Server --save-dev
App.vue -> into normal codes [email protected]
CNPM the install [email protected] --save-dev
the install VUE-HTML-CNPM Loader --save-dev
VUE-Loader-HTML, CSS-Loader, VUE-style-Loader (CSS style in the row),
JS (within the module [email protected] )
babel-loader
babel-core(核心语法)
babel-plugin-transform-runtime
babel-preset-es2015
babel-runtime
Most core:
VUE download
production is dependent on the development of dependence and by downloading the --save-dev (development dependent) distinguished name
--save (Production dependent)