亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁技術文章
文章詳情頁

javascript - "CommonsChunkPlugin now only takes a single argument.。。。。

瀏覽:101日期:2023-09-13 11:25:12

問題描述

javascript - "CommonsChunkPlugin now only takes a single argument.。。。。

Error: Deprecation notice: CommonsChunkPlugin now only takes a single argument. Either an optionsobject *or* the name of the chunk.Example: if your old code looked like this:new webpack.optimize.CommonsChunkPlugin(’vendor’, ’vendor.bundle.js’)You would change it to:new webpack.optimize.CommonsChunkPlugin({ name: ’vendor’, filename: ’vendor.bundle.js’ })The available options are:name: stringnames: string[]filename: stringminChunks: numberchunks: string[]children: booleanasync: booleanminSize: number at new CommonsChunkPlugin (E:heShengWebmanta-webnode_moduleswebpackliboptimizeCommonsChunkPlugin.js:10:10) at Object.<anonymous> (E:heShengWebmanta-webwebpackbase.config.js:82:9) at Module._compile (module.js:541:32) at Object.Module._extensions..js (module.js:550:10) at Module.load (module.js:458:32) at tryModuleLoad (module.js:417:12) at Function.Module._load (module.js:409:3) at Module.require (module.js:468:17) at require (internal/module.js:20:19) at Object.<anonymous> (E:heShengWebmanta-webwebpackwebpack.build.config.js:5:18)npm ERR! Windows_NT 6.3.9600npm ERR! argv 'E:SoftwareNodejsnode.exe' 'E:SoftwareNodejsnode_globalnode_modulesnpmbinnpm-cli.js' 'run' 'build'npm ERR! node v6.3.0npm ERR! npm v3.8.0npm ERR! code ELIFECYCLEnpm ERR! [email protected] build: `webpack --config webpack/webpack.build.config.js --progress --colors`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the [email protected] build script ’webpack --config webpack/webpack.build.config.js --progress --colors’.npm ERR! Make sure you have the latest version of node.js and npm installed.npm ERR! If you do, this is most likely a problem with the mantaweb package,npm ERR! not with npm itself.npm ERR! Tell the author that this fails on your system:npm ERR! webpack --config webpack/webpack.build.config.js --progress --colorsnpm ERR! You can get information on how to open an issue for this project with:npm ERR! npm bugs mantawebnpm ERR! Or if that isn’t available, you can get their info via:npm ERR! npm owner ls mantawebnpm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request:npm ERR! E:heShengWebmanta-webnpm-debug.log

的確我的CommonsChunkPlugin配置是他報的錯的樣子,但是我在公司的電腦上這樣配不會錯,怎么回到家里自己的電腦就會報這個錯了,改怎么解決呢(我不太想改這個配置的)?

問題解答

回答1:

不要使用webpack2.x,公司使用的配置應該是webpack1.x,2.x的配置和1.x不一樣,你看下你電腦的webpack版本吧,看是不是2.x的

回答2:

CommonsChunkPlugin 版本更新了,不再支持原來的傳參方式 而且應該很久以前的事了...

而且報錯信息里都給出改法了:

new webpack.optimize.CommonsChunkPlugin({ name: ’vendor’, filename: ’vendor.bundle.js’, minChunks: Infinity })回答3:

換一個版本的庫就好了,你公司上用什么版本,這里就用什么版本就好了。

回答4:

要么把webpack更新到2.x,要么就回到webpack1.x。因為你公司用的老版本,所以說為了保持一致性。建議你改成1.x,這樣也方便你的代碼一致性。

標簽: JavaScript
相關文章:
主站蜘蛛池模板: 好大水好多好爽好硬好深视频 | 一区二区三区网站在线免费线观看 | 91精品国产综合久久婷婷 | 日日干夜夜干 | 97国内免费久久久久久久久久 | 欧美精品亚洲网站 | 亚洲偷图色综合色就色 | 中国特级毛片 | 瑟瑟网站免费 | 综合免费视频 | 久久香蕉国产线看观看8青草 | a毛片a毛片a视频 | 午夜精品国产爱在线观看不卡 | 国产主播一区二区 | 亚洲国产成人成上人色 | 久草在线免费资源站 | 视频二区 调教中字 知名国产 | 免费黄色在线 | 日韩欧美精品综合久久 | 狠狠干影视 | 欧美一级黄色录像 | 91青青青青青爽在线 | 亚洲成人黄色在线观看 | 欧美毛片aaaaa片久久久久 | 91视频综合 | 亚洲乱淫 | 欧美日韩第一页 | 黄色片在线免费观看 | 一级中国乱子伦视频 | 日韩在线综合 | 国内自拍视频在线看免费观看 | 黄色香蕉网站 | 182tv午夜线路一线路二 | 视频一区国产精品 | 日韩在线观看网址 | a久久99精品久久久久久不 | 99久久久久国产 | 国产三级日产三级 | chinese麻豆自制国产 | 久久草在线视频 | 欧美精品国产一区二区三区 |