如果在这一节npm run dev 时出现报错的情况,基本都是webpack相关依赖不兼容的情况,以下时2021-02-13我配置的可用关键依赖:
"webpack": "^4.32.2",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.11.2",
"stylus-loader": "^4.0.0",
在package.json的dev命令中也可如下启动webpack-dev-server
"start": "webpack-dev-server --open"
"webpack": "^4.32.2",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.11.2",
"stylus-loader": "^4.0.0",
在package.json的dev命令中也可如下启动webpack-dev-server
"start": "webpack-dev-server --open"
2021-02-13
评论笑死我了,课程录制与现在版本不一致的情况肯定是无法避免的,光看敲的代码对我来说是不够的,还需要自己去看官方文档结合视频来学,自己想想为什么报错,挨个解决,其实蛮有意思的,解决问题不也是一种提升吗,我觉得很棒了!
2021-01-27
如果出现Cannot find module 'webpack-cli/bin/config-yargs' 这个错误,可以参考下面的网址↓
https://stackoverflow.com/questions/59611597/error-cannot-find-module-webpack-cli-bin-config-yargs
https://stackoverflow.com/questions/59611597/error-cannot-find-module-webpack-cli-bin-config-yargs
2020-11-05
报错信息
Module Error (from ./node_modules/vue-loader/lib/index.js):
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
原因参考官方文档
https://vue-loader.vuejs.org/migrating.html#a-plugin-is-now-required
Module Error (from ./node_modules/vue-loader/lib/index.js):
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
原因参考官方文档
https://vue-loader.vuejs.org/migrating.html#a-plugin-is-now-required
2020-10-21
过程总是很辛苦的,用的webpack4.0半个多小时才把各种东西配好,那些骂的人你们在工作中遇到问题也是这种解决方式么。解决问题的过程中是最能让人学习的。
2020-09-10