webpack4.0以上太难了....
我刚入门webpack就被版本问题坑一脸,以此第一篇博客记录一下我踩过的坑~~~
1.报错:Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration has an unknown property ‘mode‘. These properties are valid:
解决:Webpack4以上要声明mode:‘development‘,4以下版本不用
2.运行webpack-dev-server时报错:Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint instead
解决:extract-text-webpack-plugin还不能支持webpack4.0.0以上的版本,将Webpack版本将至3,全局卸载webpack:npm uninstall webpack -g,最好将node_modules文件一起删除,避免卸载残留影响低版本安装。
3.还有在实用plugin时一定要带s!!!
能记起来的就这么多啦~~之后再想到的再补充吧~~
相关推荐
不知道该写啥QAQ 2020-11-12
webfullStack 2020-11-09
Yvettre 2020-09-15
想做大牛的蜗牛 2020-10-30
gloria0 2020-10-26
gaojie0 2020-09-11
SelinaChan 2020-08-14
不知道该写啥QAQ 2020-08-09
gloria0 2020-08-09
不知道该写啥QAQ 2020-08-02
hline 2020-07-29
SelinaChan 2020-07-28
wangdianyong 2020-07-23
webpackvuees 2020-07-23
yqoxygen 2020-07-20
不知道该写啥QAQ 2020-07-18
waterv 2020-07-18
81463166 2020-07-17