您好,登錄后才能下訂單哦!
問題
E:\webpack_vue\node_modules\clean-webpack-plugin\dist\clean-webpack-plugin.js:17
throw new Error(`clean-webpack-plugin only accepts an options object. See:
^
Error: clean-webpack-plugin only accepts an options object. See:
https://github.com/johnagan/clean-webpack-plugin#options-and-defaults-optional
at new CleanWebpackPlugin (E:\webpack_vue\node_modules\clean-webpack-plugin\dist\clean-webpack-plugin.js:17:13)
at Object.<anonymous> (E:\webpack_vue\webpack.config.js:28:4)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at WEBPACK_OPTIONS (E:\webpack_vue\node_modules\webpack-cli\bin\convert-argv.js:115:13)
原因:
webpack.config.js文件的配置有問題
解決辦法
webpack4關于clean-webpack-plugin的寫法為:
plugins:[
new CleanWebpackPlugin(),//***
],
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。