一、参考资料
1. mkdir bestpractice; cd bestpractice
2. yarn init
3. yarn add -D webpack webpack-cli
4. yarn add vue vue-template-compiler vue-loader style-loader css-loader
5. vi package.json 添加如下内容
"scripts": {
"build": "webpack --config webpack.config.js"
}
6. vi webpack.config.js
constpath =require('path')
module.exports = {entry:'./src/main.js',output: {path: path.resolve(__dirname, dist),filename:'index.js'} }
网友评论