@seayoo-web/scripts 2.8.1 → 2.9.0
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 -1
- package/package.json +2 -2
- package/types/src/vite.page.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -218,7 +218,7 @@ function definePageBuildConfig(option) {
|
|
|
218
218
|
if (k) return trunkMap[k];
|
|
219
219
|
};
|
|
220
220
|
const ignoreSideEffects = ["thinkingdata", "@esotericsoftware/spine", ...badPackages];
|
|
221
|
-
const baseValue = typeof base === "object" && base ? base[mode] : typeof base === "string" ? base : "./";
|
|
221
|
+
const baseValue = typeof base === "function" ? base(mode, envs.viteEnvs) || "./" : typeof base === "object" && base ? base[mode] : typeof base === "string" ? base : "./";
|
|
222
222
|
if (baseValue === void 0 && mode !== "development") {
|
|
223
223
|
console.warn(`base 参数在模式(${mode})下未设置内容`.red);
|
|
224
224
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seayoo-web/scripts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "scripts for seayoo web repos",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.ts",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"rollup-plugin-visualizer": "^6.0.3",
|
|
53
53
|
"terser": "^5.43.1",
|
|
54
54
|
"vite-plugin-stylelint": "^6.0.2",
|
|
55
|
+
"stylelint-order": "^7.0.0",
|
|
55
56
|
"@seayoo-web/finder": "^2.1.1"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
@@ -63,7 +64,6 @@
|
|
|
63
64
|
"stylelint": "^16.22.0",
|
|
64
65
|
"stylelint-config-recess-order": "^7.1.0",
|
|
65
66
|
"stylelint-config-standard": "^38.0.0",
|
|
66
|
-
"stylelint-order": "^7.0.0",
|
|
67
67
|
"@seayoo-web/tsconfig": "^1.0.5"
|
|
68
68
|
},
|
|
69
69
|
"optionalDependencies": {
|
package/types/src/vite.page.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UserConfig, UserConfigFnPromise } from "vite";
|
|
2
2
|
interface ExternalConfig {
|
|
3
3
|
/** 设置base路径,支持配置多组 base,以 mode 为key */
|
|
4
|
-
base?: string | Record<string, string
|
|
4
|
+
base?: string | Record<string, string> | ((mode: string, env: Record<string, string>) => string);
|
|
5
5
|
/** 是否不使用 vue */
|
|
6
6
|
notVuePage?: boolean;
|
|
7
7
|
/** 是否不加载 polyfill */
|