@seayoo-web/scripts 2.7.0 → 2.7.2

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
@@ -204,7 +204,7 @@ function definePageBuildConfig(option) {
204
204
  process.exit(0);
205
205
  }
206
206
  if (envTransform) {
207
- envs.viteEnvs = envTransform(envs.viteEnvs);
207
+ envs.viteEnvs = await envTransform(envs.viteEnvs, command, mode);
208
208
  }
209
209
  const trunkMap = {
210
210
  "naive-ui": "naive-ui",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seayoo-web/scripts",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "description": "scripts for seayoo web repos",
5
5
  "type": "module",
6
6
  "source": "index.ts",
@@ -48,7 +48,7 @@ interface ExternalConfig {
48
48
  /**
49
49
  * 动态修改环境变量
50
50
  */
51
- envTransform?: (env: Record<string, string>) => Record<string, string>;
51
+ envTransform?: (env: Record<string, string>, command: "build" | "serve", mode: string) => Promise<Record<string, string>> | Record<string, string>;
52
52
  }
53
53
  /**
54
54
  * 导出一个动态的配置工厂函数