@ecoding/base.build 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,6 +12,7 @@
12
12
  outputLibrary: string; // micro == child时生效,整个库向外暴露的变量名
13
13
  publicPath: string; // client cdn 资源前缀
14
14
  outputPath: string; // client build bundle 目录,相对命令执行目录
15
+ runtimeChunk: bool; // 是否在html里内联webpack-runtime
15
16
  externals: object;
16
17
  /* externals
17
18
  {
@@ -62,7 +62,7 @@ const getOptimization = () => {
62
62
  };
63
63
  }
64
64
 
65
- if (customConfig.micro !== "child") {
65
+ if (customConfig.runtimeChunk && customConfig.micro !== "child") {
66
66
  obj.runtimeChunk = {
67
67
  // 单独分割运行时代码 webpack 运行时所需代码
68
68
  name: (entrypoint) => `wp-runtime-${entrypoint.name}`
@@ -62,7 +62,7 @@ const getOptimization = () => {
62
62
  };
63
63
  }
64
64
 
65
- if (customConfig.micro !== "child") {
65
+ if (customConfig.runtimeChunk && customConfig.micro !== "child") {
66
66
  obj.runtimeChunk = {
67
67
  // 单独分割运行时代码 webpack 运行时所需代码
68
68
  name: (entrypoint) => `wp-runtime-${entrypoint.name}`
@@ -96,7 +96,7 @@ module.exports = () => {
96
96
  ...getHtmlWebpack(),
97
97
 
98
98
  // 内联runtime
99
- customConfig.micro !== "child" && new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/wp-runtime-.*\.js/]),
99
+ customConfig.runtimeChunk && customConfig.micro !== "child" && new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/wp-runtime-.*\.js/]),
100
100
 
101
101
  new CleanWebpackPlugin(),
102
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/base.build",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "tpl building",
5
5
  "author": "cxc",
6
6
  "license": "MIT",
@@ -53,5 +53,5 @@
53
53
  "publishConfig": {
54
54
  "access": "public"
55
55
  },
56
- "gitHead": "6df3d5d7a7e7e191e2dc0b65cc8a57b2da118f94"
56
+ "gitHead": "4391d2d985b66c5d65433d0f5909d3ec0e725490"
57
57
  }