@seayoo-web/scripts 2.0.9 → 2.0.11
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 +1 -6
- package/package.json +1 -1
- package/types/src/vite.page.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -146,7 +146,7 @@ function definePageBuildConfig(option) {
|
|
|
146
146
|
const { alias, ...resolveReset } = resolve;
|
|
147
147
|
return async function({ command, mode }) {
|
|
148
148
|
var _a;
|
|
149
|
-
const justBuild = onlyBuild ||
|
|
149
|
+
const justBuild = onlyBuild || mode === "build";
|
|
150
150
|
const envs = getBuildEnv(command, mode, justBuild);
|
|
151
151
|
const gitInfo = justBuild ? null : await getCommitInfo(command, mode, envs.page, envs.deployTo || "");
|
|
152
152
|
const isProductMode = mode === "production" || mode === "prod";
|
|
@@ -155,11 +155,6 @@ function definePageBuildConfig(option) {
|
|
|
155
155
|
"naive-ui": "naive-ui",
|
|
156
156
|
html2canvas: "html2canvas",
|
|
157
157
|
thinkingdata: "thinkingdata",
|
|
158
|
-
pinia: "vue",
|
|
159
|
-
"vue-router": "vue",
|
|
160
|
-
"plugin-vue:": "vue",
|
|
161
|
-
"/vue/": "vue",
|
|
162
|
-
"/@vue": "vue",
|
|
163
158
|
node_modules: "vendor"
|
|
164
159
|
};
|
|
165
160
|
const trunkKeys = Object.keys(trunkMap).sort((a, b) => a === "node_modules" ? 1 : b === "node_modules" ? -1 : 0);
|
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`, node_modules: `vendor`}
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* 设置的值会跟默认值进行合并。
|
|
16
16
|
*
|
|
17
17
|
* 也可以手工设定 `build.rollupOptions.output.manualChunks` 来自定义
|
|
18
18
|
*/
|