akfun 5.2.8 → 5.2.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akfun",
3
- "version": "5.2.8",
3
+ "version": "5.2.9",
4
4
  "description": "前端脚手架:支持Vue技术栈和react技术栈",
5
5
  "keywords": [
6
6
  "前端工程",
@@ -66,6 +66,10 @@ module.exports = function (config, envConfig, _rollupConfig, _consoleTag) {
66
66
  }
67
67
  if (compress && isArray(curRollupConfig.output)) {
68
68
  curRollupConfig.output.map((outputItem) => {
69
+ if (outputItem.notCompressed) {
70
+ // 不压缩代码
71
+ return;
72
+ }
69
73
  if (!outputItem.plugins) {
70
74
  outputItem.plugins = [terser()];
71
75
  } else {
@@ -74,7 +78,7 @@ module.exports = function (config, envConfig, _rollupConfig, _consoleTag) {
74
78
  });
75
79
  } else if (compress && isObject(curRollupConfig.output)) {
76
80
  if (!curRollupConfig.plugins) {
77
- curRollupConfig.output.plugins = [terser()];
81
+ curRollupConfig.plugins = [terser()];
78
82
  } else {
79
83
  curRollupConfig.plugins.push(terser());
80
84
  }
@@ -142,7 +142,8 @@ module.exports = function (curConfig, curEnvConfig) {
142
142
  output: [
143
143
  {
144
144
  file: resolveToCurrentDist(`${curFileName}.${buildFormat}.js`, curEnvConfig.outDir),
145
- format: buildFormat
145
+ format: buildFormat,
146
+ notCompressed: true, // 不压缩代码
146
147
  },
147
148
  {
148
149
  file: resolveToCurrentDist(`${curFileName}.${buildFormat}.min.js`, curEnvConfig.outDir),