kn-cli 1.0.116 → 1.0.117

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.
@@ -40,7 +40,7 @@ warn(`=====================env end=========================`);
40
40
  const build_log_level=process.env.build_log_level || 'clear';
41
41
  const devMode = process.env.build_env !== 'prod';
42
42
  const hashMode = CLI_CONFIG?.hashMode ?? process.env.build_env != 'localdebug';
43
- const cssSplitMode = CLI_CONFIG?.cssSplitMode??true;
43
+ const cssSplitMode = CLI_CONFIG?.cssSplitMode??(process.env.build_env == 'localdebug'?false:true);
44
44
  const resource_path_relative= CLI_CONFIG?.site_root_path??'';
45
45
  const support_sass=CLI_CONFIG?.sass??false;
46
46
  const css_modules= CLI_CONFIG?.cssModule??'local';
@@ -52,6 +52,8 @@ const devServer=CLI_CONFIG?.devServer??{};
52
52
  const prject_name = CLI_CONFIG?.name??'';
53
53
  const sourceMapLocal = CLI_CONFIG?.sourcemap?.local??false;//是否将soucemap改为本地
54
54
 
55
+
56
+
55
57
  let distFolder = 'dist';
56
58
  let distJsFolder='';
57
59
  if(CLI_CONFIG?.dist){
@@ -385,6 +387,10 @@ if(devMode){
385
387
  }
386
388
  plugins.push(new webpack.SourceMapDevToolPlugin({
387
389
  filename: 'sourcemap/[file].map',
390
+ // filename: false, // 避免生成额外的 .map 文件,提高构建速度
391
+ // module: true, // 使 source map 映射到 loader 处理前的源码
392
+ // columns: false, // 只映射到行,忽略列信息,提高性能
393
+ // lineToLine: false, // 关闭逐行映射,减少计算量
388
394
  // publicPath: '..',//resource_path_relative,
389
395
  // fileContext: 'js',
390
396
  }))
@@ -523,6 +529,10 @@ const config={
523
529
  },
524
530
  optimization: optimization,
525
531
  plugins: plugins,
532
+ // watchOptions: {
533
+ // aggregateTimeout: 5000, // 文件变化后延迟 300 毫秒再重新构建
534
+ // ignored: /node_modules/ // 忽略 node_modules 目录
535
+ // }
526
536
  };
527
537
 
528
538
  if(process.env.build_env == 'localdebug'){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kn-cli",
3
- "version": "1.0.116",
3
+ "version": "1.0.117",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {