webpack浅析---出口篇

原文链接: http://www.cnblogs.com/moneyss/p/9683270.html

webpack有四个核心概念:

入口(entry)

输出(output)

loader

插件(plugins)

输出:

在哪里输出创建的bundles,以及如何命名这些文件, 默认./dist

filename : 输出文件的文件名

path:         目标输出目录 path 的绝对路径。

output: {

 library: "someLibName",
  libraryTarget: "umd", filename: "someLibName.js", auxiliaryComment: "注释" // 此选项允许用户向导出容器(export wrapper)中插入注释
auxiliaryComment: { // 单独加注释
  root: "Root Comment", commonjs: "CommonJS Comment", commonjs2: "CommonJS2 Comment", amd: "AMD Comment" }

}

chunkFilename:   非入口文件的名称

这些文件名 需要在runtime根据chunk发送的请求去生成

所以 runtime输出bundle值时 

转载于:https://www.cnblogs.com/moneyss/p/9683270.html

猜你喜欢

转载自blog.csdn.net/weixin_30611509/article/details/94822564