kn-cli 1.0.88 → 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.
package/build/start.sh CHANGED
@@ -58,6 +58,11 @@ setNpmSetup(){
58
58
 
59
59
  npm config delete registry -g
60
60
  npm config delete registry
61
+
62
+ # 解决postcss在引用puppeteer包时,下载chrome内核引起的安装失败问题
63
+ # 报错内容:npm ERR! ERROR: Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
64
+ export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
65
+ export PUPPETEER_SKIP_DOWNLOAD=true
61
66
 
62
67
  showLog "使用npm默认镜像源"
63
68
  if [ -n "$registryType" ]
@@ -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.88",
3
+ "version": "1.0.90",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/readme.md CHANGED
@@ -129,9 +129,23 @@ report
129
129
  ```
130
130
  devServer:{host:'0.0.0.0'}
131
131
  ```
132
-
132
+
133
+ * 编译时遇到报错
134
+ * `npm ERR! ERROR: Failed to download Chromium r686378! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.`
135
+ 在dev.sh和frontend_build.sh内增加` export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true `解决
136
+
137
+
138
+
139
+
140
+
133
141
 
134
142
  # 更新日志
143
+ * 1.0.90
144
+ 优化在hashMode=false的情况下,html内引用js、css资源时在尾部增加v=版本号
145
+
146
+ * 1.0.89
147
+ cli在npm i时,默认增加` export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true` 解决puppeteer包安装引起的异常
148
+
135
149
  * 1.0.85
136
150
  cli工具内增加docker环境工具,用于将当前项目直接在docker内运行
137
151