kn-cli 1.0.89 → 1.0.90

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.
@@ -109,7 +109,7 @@ if(CLI_CONFIG?.entry){
109
109
  ////////////// OUTPUT ///////////////
110
110
  const output= {
111
111
  // devtoolModuleFilenameTemplate:'webpack:///dist/[resource-path]',
112
- filename: `[name]${hashMode ? '-[chunkhash]' : ''}.js`,
112
+ filename: hashMode?`[name]-[chunkhash].js`:`[name].js?v=${NowDateTime}`,
113
113
  path: path.join(dirname, distFolder,distJsFolder),
114
114
  publicPath: resource_path_relative,
115
115
  };
@@ -305,7 +305,7 @@ if(jsSplitMode){
305
305
  if(jsSplitMode===true||jsSplitMode?.runtime!==false){
306
306
  if(indexHtml){//只有当会注入到html内时才允许带runtime,避免多entry情况下入口js变为chunk.js
307
307
  optimization.runtimeChunk= {
308
- name: 'runtime', // 所有入口有自己的runtime.js
308
+ name: `runtime`, // 所有入口有自己的runtime.js
309
309
  };
310
310
  }
311
311
  }
@@ -443,7 +443,7 @@ if (!devMode) {
443
443
  if(cssSplitMode){
444
444
  plugins.push(
445
445
  new MiniCssExtractPlugin({
446
- filename: `[name]${hashMode ? '-[chunkhash:8]' : ''}.css`,
446
+ filename: hashMode?`[name]-[chunkhash:8].css`:`[name].css?v=${NowDateTime}`,
447
447
  ignoreOrder: true
448
448
  }),
449
449
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kn-cli",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -140,6 +140,9 @@ report
140
140
 
141
141
 
142
142
  # 更新日志
143
+ * 1.0.90
144
+ 优化在hashMode=false的情况下,html内引用js、css资源时在尾部增加v=版本号
145
+
143
146
  * 1.0.89
144
147
  cli在npm i时,默认增加` export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true` 解决puppeteer包安装引起的异常
145
148