@seayoo-web/scripts 2.0.10 → 2.0.12

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/dist/index.js CHANGED
@@ -151,18 +151,12 @@ function definePageBuildConfig(option) {
151
151
  const gitInfo = justBuild ? null : await getCommitInfo(command, mode, envs.page, envs.deployTo || "");
152
152
  const isProductMode = mode === "production" || mode === "prod";
153
153
  const trunkMap = {
154
- ...manualChunks,
155
154
  "naive-ui": "naive-ui",
156
155
  html2canvas: "html2canvas",
157
156
  thinkingdata: "thinkingdata",
158
- pinia: "vue",
159
- "vue-router": "vue",
160
- "plugin-vue:": "vue",
161
- "/vue/": "vue",
162
- "/@vue": "vue",
163
- node_modules: "vendor"
157
+ ...manualChunks
164
158
  };
165
- const trunkKeys = Object.keys(trunkMap).sort((a, b) => a === "node_modules" ? 1 : b === "node_modules" ? -1 : 0);
159
+ const trunkKeys = Object.keys(trunkMap);
166
160
  const trunkFn = function(id) {
167
161
  const k = trunkKeys.find((k2) => id.includes(k2));
168
162
  if (k) return trunkMap[k];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seayoo-web/scripts",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "description": "scripts for seayoo web repos",
5
5
  "type": "module",
6
6
  "source": "index.ts",
@@ -10,9 +10,9 @@ interface ExternalConfig {
10
10
  /**
11
11
  * 手工指定 trunk 合并策略,Record<key, chunk>,即 id.include(key) 则打到 trunk 中
12
12
  *
13
- * 默认 {`naive-ui`, `html2canvas`, `thinkingdata`, `vue`, node_modules: `vendor`}
13
+ * 默认 {`naive-ui`, `html2canvas`, `thinkingdata`}
14
14
  *
15
- * 设置的值会跟默认值进行合并。其中 `vue` trunk 的实际包含了 `pinia` `vue-router` 在内的多个工具包
15
+ * 设置的值会跟默认值进行合并。
16
16
  *
17
17
  * 也可以手工设定 `build.rollupOptions.output.manualChunks` 来自定义
18
18
  */