webpack2+vue2.0+vue router2实例
直接上项目配置: { "name": "web", "version": "1.0.0", "description": "", "main": "webpack.config.js", "scripts": { "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot", "build": "cross-env NODE_ENV=production webpack --progress --hide-modules", "test": "echo \"Error: no test specified\" && exit 1", "watch": "webpack-dev-server --inline --hot" //用来做热启动,通过命令"webpack-dev-server"可以让改的代码立马生效不用一直每次都跑一下命令"webpack" }, "author": "", "license": "ISC", "dependencies": { "vue": "^2.1.10", "vue-resource": "^1.2.0", "vue-router": "^2.2.1" }, "devDependencies": { "babel-core": "^6.23.1", "babel-loader": "^6.3.2", "babel-preset-es2015": "^6.22.0", "css-loader": "^0.26.1", "file-loader": "^0.10.0", "html-loader": "^0.4.4", "style-loader": "^0.13.1", "vue-html-loader": "^1.2.3", "vue-loader": "^11.1.0", "vue-style-loader": "^2.0.0", "vue-template-compiler": "^2.1.10", "webpack": "^2.2.1", "webpack-dev-server": "^2.4.1" } }
用户评论