这一节课内容已经调试通过,https://gitee.com/panqingqiang/imooc-todolist。注意package.json配置, webpack-dev-server,webpack需要全局安装,cnpm i webpack@3.10.0 -g
2018-04-17
我觉得要多看控制台报错,几乎都是可以读懂的,比如说缺乏什么依赖的包啊,哪里写错了啊,有些错误控制台还会给出更正的语法的
2018-04-16
先全局安装webpack, cnpm install webpack@3.10.0 -g
接下来是依赖 ,这个是老师配置的,
cnpm install vue@2.5.13 --save
"dependencies": {
"css-loader": "^0.28.7",
"vue": "^2.5.13",
"vue-loader": "^13.6.0",
"vue-template-compiler": "^2.5.13",
"webpack": "^3.10.0"
}
接下来是依赖 ,这个是老师配置的,
cnpm install vue@2.5.13 --save
"dependencies": {
"css-loader": "^0.28.7",
"vue": "^2.5.13",
"vue-loader": "^13.6.0",
"vue-template-compiler": "^2.5.13",
"webpack": "^3.10.0"
}
2018-04-12
npm run dev 时,老是提醒这个错误:Error: Couldn't find preset "env" relative to directory "D:\\csq\\ctest",明明昨天还可以运行
2018-04-12
npm run dev错误可以试试dev改成这个
"dev": "set NODE_ENV=development && webpack-dev-server --config webpack.config.js"
node版本 8以上
"dev": "set NODE_ENV=development && webpack-dev-server --config webpack.config.js"
node版本 8以上
2018-04-11
我是else里面加Config.optimization = ({
minimizer: [...],
splitChunks: {
cacheGroups: {
vendor: {
name: 'vendor'
}
}
}
});
minimizer: [...],
splitChunks: {
cacheGroups: {
vendor: {
name: 'vendor'
}
}
}
});
2018-04-10