传统web项目搭建学习
1、安装插件
# babel安装问题,Cannot find module ‘@babel/core‘ requires Babel 7.x (the package ‘@babel/c # 原因是: # babel-loader和babel-core版本不对应所产生的, # babel-loader 8.x对应babel-core 7.x # babel-loader 7.x对应babel-core 6.x npm install @babel/core @babel/preset-env webpack
2、clean-webpack-plugin
TypeError: CleanWebpackPlugin is not a constructor 新版本的clean-webpack-plugin引入已经改为const { CleanWebpackPlugin } = require(‘clean-webpack-plugin‘); plugins: [ // 可是不传参的话,他怎么知道我要删除的是哪个文件?看了官方介绍才知道,要删除的正是output.path!我的output配置项里的路径就是dist目录。 new CleanWebpackPlugin(), ]
相关推荐
82530995 2020-10-15
ruanhongbiao 2020-08-16
FEvivi 2020-06-16
FEvivi 2020-06-13
PANH 2020-06-12
zhongweinan 2020-06-10
PANH 2020-06-07
PANH 2020-06-01
82530995 2020-05-10
webfullStack 2020-04-26
zhongweinan 2020-04-24
FEvivi 2020-04-17
FEvivi 2020-04-15
zhongweinan 2020-03-03
zhongweinan 2020-02-21
PANH 2020-02-19
PANH 2020-01-23
zhongweinan 2020-01-21
上海彭彭 2020-01-14