@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 +2 -8
- package/package.json +1 -1
- package/types/src/vite.page.d.ts +2 -2
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
|
-
|
|
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)
|
|
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
package/types/src/vite.page.d.ts
CHANGED
|
@@ -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
|
|
13
|
+
* 默认 {`naive-ui`, `html2canvas`, `thinkingdata`}
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* 设置的值会跟默认值进行合并。
|
|
16
16
|
*
|
|
17
17
|
* 也可以手工设定 `build.rollupOptions.output.manualChunks` 来自定义
|
|
18
18
|
*/
|