Node.js 错误-清除网页包插件仅接受选项对象
每当我试图将代码推送到heroku时,就会收到此错误。有解决办法吗Node.js 错误-清除网页包插件仅接受选项对象,node.js,reactjs,heroku,webpack,deployment,Node.js,Reactjs,Heroku,Webpack,Deployment,每当我试图将代码推送到heroku时,就会收到此错误。有解决办法吗 new CleanWebpackPlugin(['dist'], { root: path.resolve(__dirname, '..'), exclude: '.gitignore' }) 错误:clean webpack插件仅接受选项对象。见: remote: https://github.com/johnagan/clean-webpack-plugin#options-and- defaults-opti
new CleanWebpackPlugin(['dist'], {
root: path.resolve(__dirname, '..'),
exclude: '.gitignore'
})
错误:clean webpack插件仅接受选项对象。见:
remote: https://github.com/johnagan/clean-webpack-plugin#options-and-
defaults-optional
remote: at new CleanWebpackPlugin
(/tmp/build_292ba470efc2cc3ad6c89a8c22c708c9/node_modules/clean-webpack-
plugin/dist/clean-webpack-plugin.js:17:13)
remote: at Object.<anonymous>
(/tmp/build_292ba470efc2cc3ad6c89a8c22c708c9/webpack/prod.config.js:90:5)
remote: at Module._compile
(/tmp/build_292ba470efc2cc3ad6c89a8c22c708c9/node_modules/v8-compile-
cache/v8-compile-cache.js:192:30)
remote:at Object.Module._extensions..js (internal/modules/cjs/loader.js:7
远程:https://github.com/johnagan/clean-webpack-plugin#options-及-
默认值可选
远程:在新的CleanWebpackPlugin上
(/tmp/build_292ba470efc2cc3ad6c89a8c22c708c9/node_模块/干净的网页包-
plugin/dist/clean网页包plugin.js:17:13)
远程:在对象上。
(/tmp/build_292ba470efc2cc3ad6c89a8c2c708c9/webpack/prod.config.js:90:5)
远程:at模块。\u编译
(/tmp/build_292ba470efc2cc3ad6c89a8c2c708c9/node_modules/v8 compile-
cache/v8编译cache.js:192:30)
远程:at Object.Module._extensions..js(internal/modules/cjs/loader.js:7
看起来您正在使用旧配置和新插件版本。请检查:
如果使用基本配置新建CleanWebpackPlugin(['dist']),只需删除
['dist']一切都将按预期工作。否则请阅读
仔细看下面
看起来您正在使用旧配置和新插件版本。请检查: 如果使用基本配置新建CleanWebpackPlugin(['dist']),只需删除 ['dist']一切都将按预期工作。否则请阅读 仔细看下面
我阅读了官方文档并已经删除了['dist']没有任何更改仍然出现相同的错误
root
和exclude
选项过期我必须将我的代码转换为新版本,但问题是如何转换?我阅读了官方文档并已经删除了['dist']没有任何更改仍然会出现相同的错误root
和exclude
选项过期我必须将我的代码转换为新版本,但问题是如何转换?