Questions tagged «commonschunkplugin»

1
有人可以解释Webpack的CommonsChunkPlugin
我得到了一个基本要点,即CommonsChunkPlugin查看所有入口点,检查它们之间是否存在通用的软件包/依赖项,并将它们分成自己的捆绑包。 因此,假设我具有以下配置: ... enrty : { entry1 : 'entry1.js', //which has 'jquery' as a dependency entry2 : 'entry2.js', //which has 'jquery as a dependency vendors : [ 'jquery', 'some_jquery_plugin' //which has 'jquery' as a dependency ] }, output: { path: PATHS.build, filename: '[name].bundle.js' } ... 如果我捆绑而不使用 CommonsChunkPlugin 我将得到3个新的捆绑包文件: entry1.bundle.js包含来自entry1.js和的完整代码,jquery并包含自己的运行时 entry2.bundle.js包含来自entry2.js和的完整代码,jquery并包含自己的运行时 …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.