@hzab/vite-config 0.0.2-alpha.0 → 0.0.3-alpha.1

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +95 -83
  2. package/LICENSE +21 -21
  3. package/README.md +184 -173
  4. package/dist/create-app-vite-config.cjs +160 -27
  5. package/dist/create-app-vite-config.cjs.map +1 -1
  6. package/dist/create-app-vite-config.js +160 -27
  7. package/dist/create-app-vite-config.js.map +1 -1
  8. package/dist/create-library-vite-config.cjs +39 -4
  9. package/dist/create-library-vite-config.cjs.map +1 -1
  10. package/dist/create-library-vite-config.js +38 -3
  11. package/dist/create-library-vite-config.js.map +1 -1
  12. package/dist/create-package-vitest-config.cjs.map +1 -1
  13. package/dist/create-package-vitest-config.js.map +1 -1
  14. package/dist/create-vite-config.cjs +160 -27
  15. package/dist/create-vite-config.cjs.map +1 -1
  16. package/dist/create-vite-config.js +160 -27
  17. package/dist/create-vite-config.js.map +1 -1
  18. package/dist/index.cjs +198 -30
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.js +199 -31
  23. package/dist/index.js.map +1 -1
  24. package/dist/plugins/copy.cjs.map +1 -1
  25. package/dist/plugins/copy.js.map +1 -1
  26. package/dist/plugins/hash-deploy.cjs +150 -25
  27. package/dist/plugins/hash-deploy.cjs.map +1 -1
  28. package/dist/plugins/hash-deploy.d.cts +16 -5
  29. package/dist/plugins/hash-deploy.d.ts +16 -5
  30. package/dist/plugins/hash-deploy.js +150 -25
  31. package/dist/plugins/hash-deploy.js.map +1 -1
  32. package/dist/plugins/less-tilde.cjs.map +1 -1
  33. package/dist/plugins/less-tilde.d.cts +17 -2
  34. package/dist/plugins/less-tilde.d.ts +17 -2
  35. package/dist/plugins/less-tilde.js.map +1 -1
  36. package/dist/plugins/lifecycle.cjs.map +1 -1
  37. package/dist/plugins/lifecycle.js.map +1 -1
  38. package/dist/plugins/public-assets.cjs.map +1 -1
  39. package/dist/plugins/public-assets.js.map +1 -1
  40. package/dist/plugins/public-config.cjs.map +1 -1
  41. package/dist/plugins/public-config.js.map +1 -1
  42. package/dist/plugins/react-compiler.cjs.map +1 -1
  43. package/dist/plugins/react-compiler.js.map +1 -1
  44. package/dist/plugins/relative-base.cjs.map +1 -1
  45. package/dist/plugins/relative-base.js.map +1 -1
  46. package/dist/plugins/stub-less.cjs.map +1 -1
  47. package/dist/plugins/stub-less.js.map +1 -1
  48. package/dist/plugins/svg-react.cjs.map +1 -1
  49. package/dist/plugins/svg-react.js.map +1 -1
  50. package/dist/types.d.cts +19 -8
  51. package/dist/types.d.ts +19 -8
  52. package/dist/vitest.cjs.map +1 -1
  53. package/dist/vitest.js.map +1 -1
  54. package/docs/README.md +15 -15
  55. package/docs/abt-management-ui/vite.config.mts +226 -226
  56. package/docs/api.md +404 -366
  57. package/docs/migration-from-webpack.md +723 -722
  58. package/docs/sync-public-path.md +52 -52
  59. package/docs/vite-config-integration.md +477 -476
  60. package/docs/vite-pnpm-integration.md +279 -279
  61. package/docs/vs-ccc-vite-config.md +26 -26
  62. package/docs/webpack-gap.md +108 -107
  63. package/package.json +1 -1
  64. package/src/client.d.ts +9 -9
  65. package/src/create-app-vite-config.ts +236 -218
  66. package/src/create-library-vite-config.ts +248 -199
  67. package/src/create-package-vitest-config.ts +54 -54
  68. package/src/create-vite-config.ts +22 -22
  69. package/src/index.ts +41 -42
  70. package/src/plugins/copy.ts +25 -25
  71. package/src/plugins/hash-deploy.ts +239 -199
  72. package/src/plugins/hash-dir-name.ts +212 -0
  73. package/src/plugins/less-tilde.ts +72 -44
  74. package/src/plugins/lifecycle.ts +40 -40
  75. package/src/plugins/public-assets.ts +28 -28
  76. package/src/plugins/public-config.ts +34 -34
  77. package/src/plugins/react-compiler.ts +32 -32
  78. package/src/plugins/relative-base.ts +20 -20
  79. package/src/plugins/stub-less.ts +26 -26
  80. package/src/plugins/svg-react.ts +90 -90
  81. package/src/svg-react-runtime.ts +4 -4
  82. package/src/svg-react.d.ts +6 -6
  83. package/src/types.ts +325 -314
  84. package/src/vitest-types.ts +20 -20
  85. package/src/vitest.ts +2 -2
  86. package/templates/src/vite-env.d.ts +2 -2
  87. package/templates/tsconfig.json +12 -12
  88. package/templates/vite.config.ts +26 -26
@@ -1,218 +1,236 @@
1
- import basicSsl from "@vitejs/plugin-basic-ssl";
2
- import react from "@vitejs/plugin-react";
3
- import { mergeConfig, type PluginOption, type UserConfig } from "vite";
4
- import { createHtmlPlugin } from "vite-plugin-html";
5
-
6
- import { copyPlugin } from "./plugins/copy.ts";
7
- import { createHashBuildDirName, hashDeployPlugin } from "./plugins/hash-deploy.ts";
8
- import { buildLessOptions } from "./plugins/less-tilde.ts";
9
- import { lifecyclePlugin } from "./plugins/lifecycle.ts";
10
- import { publicAssetsPlugin } from "./plugins/public-assets.ts";
11
- import { publicConfigPlugin } from "./plugins/public-config.ts";
12
- import { reactCompilerPlugin } from "./plugins/react-compiler.ts";
13
- import { svgReactPlugin } from "./plugins/svg-react.ts";
14
-
15
- import type { CreateAppViteConfigOptions, CreateAppViteConfigResult } from "./types.ts";
16
-
17
- /** 根入口运行时资源前缀,供 JS `fetch` / 动态 URL 使用。与 HTML 子目录 `PUBLIC_PATH` 可能不同。 */
18
- const JS_PUBLIC_PATH_DEFINE_KEY = "import.meta.env.PUBLIC_PATH";
19
-
20
- /** 规范化资源 base:空串视为未设置;非空则保证尾 `/`。 */
21
- function normalizeAssetBase(base: string | undefined): string | undefined {
22
- if (base == null) return undefined;
23
- const trimmed = base.trim();
24
- if (!trimmed) return undefined;
25
- return trimmed.endsWith("/") ? trimmed : `${trimmed}/`;
26
- }
27
-
28
- function ensureTrailingSlash(value: string): string {
29
- return value.endsWith("/") ? value : `${value}/`;
30
- }
31
-
32
- /**
33
- * JS 可读的根入口前缀。相对 hash 必须用 `./{hash}/`,不能用 Vite `base`(后者保持 `./`)。
34
- * 非 hash 则跟最终 `config.base`;serve 未设 base 时为 `"/"`。
35
- */
36
- function resolveJsPublicPath(isHash: boolean, publicPath: string, config: UserConfig): string {
37
- if (isHash) return publicPath;
38
- if (typeof config.base === "string" && config.base.length > 0) {
39
- return ensureTrailingSlash(config.base);
40
- }
41
- return publicPath || "/";
42
- }
43
-
44
- function applyJsPublicPathDefine(config: UserConfig, publicPath: string): UserConfig {
45
- config.define = {
46
- ...config.define,
47
- [JS_PUBLIC_PATH_DEFINE_KEY]: JSON.stringify(publicPath),
48
- };
49
- return config;
50
- }
51
-
52
- /**
53
- * 组装应用侧 Vite 配置。
54
- *
55
- * 合并顺序:`base(options) → mergeConfig(base, vite) → configure(final)`,
56
- * 之后写入 `import.meta.env.PUBLIC_PATH`(同名 `define` 会被覆盖)。
57
- *
58
- * 返回值附带只读 `buildDirHash`(本次 hash 子目录名;未启用时为 `""`)。
59
- * @public
60
- */
61
- export function createAppViteConfig(
62
- options: CreateAppViteConfigOptions,
63
- ): CreateAppViteConfigResult {
64
- const {
65
- rootDir,
66
- repositoryRoot,
67
- command,
68
- mode,
69
- alias,
70
- useHttps = false,
71
- openBrowser = true,
72
- hashDeploy = false,
73
- hashTimestamp = "epoch",
74
- base: baseOption,
75
- deployRoot: deployRootOption = "dist",
76
- hashCleanup,
77
- publicAssets,
78
- publicConfig,
79
- copy: copyOption,
80
- htmlData,
81
- devProxy,
82
- reactCompiler = "build-only",
83
- react: enableReact = true,
84
- svgr: svgrOption = false,
85
- less,
86
- onRun,
87
- onDone,
88
- plugins: extraPlugins = [],
89
- vite: viteOverride,
90
- configure,
91
- } = options;
92
-
93
- const isDev = command === "serve";
94
- const isBuild = command === "build";
95
- const isHash = isBuild && Boolean(hashDeploy) && mode !== "development";
96
- const deployRoot = deployRootOption.replace(/\/+$/, "") || "dist";
97
- const assetBase = normalizeAssetBase(baseOption);
98
-
99
- const buildDirStr = isHash
100
- ? createHashBuildDirName({
101
- repositoryRoot: repositoryRoot ?? rootDir,
102
- timestampFormat: hashTimestamp,
103
- })
104
- : "";
105
- /**
106
- * HTML / 根入口资源前缀(JS `import.meta.env.PUBLIC_PATH` 用这个)。
107
- * - hash + 相对:`./{hash}/`(Vite `base` 仍为 `./`,由插件改写根入口)
108
- * - hash + 绝对 base:`{base}{hash}/`(与 Vite `base` 一致)
109
- * - 普通 build:`base` 或 `./`
110
- */
111
- const publicPath = isHash
112
- ? `${assetBase ?? "./"}${buildDirStr}/`
113
- : isBuild
114
- ? (assetBase ?? "./")
115
- : "";
116
- /**
117
- * Hash 子目录入口相对于自身加载资源;根入口由 hashDeployPlugin 再补 hash 前缀。
118
- * 绝对 base 则两个入口都使用同一个完整 URL。
119
- */
120
- const htmlPublicPath = isHash && publicPath.startsWith("./") ? "./" : publicPath;
121
- /** 相对 base(含默认 `./`)在 hash 下必须保持 Vite `base: "./"`,否则 `./{hash}/` 会被规范成 `/`。 */
122
- const isAbsoluteAssetBase =
123
- assetBase != null &&
124
- (assetBase.startsWith("https://") ||
125
- assetBase.startsWith("http://") ||
126
- assetBase.startsWith("/"));
127
- const viteBase = isHash
128
- ? isAbsoluteAssetBase
129
- ? publicPath
130
- : "./"
131
- : isBuild
132
- ? publicPath
133
- : undefined;
134
- const enablePublicAssets = publicAssets !== false;
135
-
136
- const plugins: PluginOption[] = [
137
- ...(enablePublicAssets
138
- ? [publicAssetsPlugin(publicAssets && typeof publicAssets === "object" ? publicAssets : {})]
139
- : []),
140
- ...(svgrOption ? [svgReactPlugin(svgrOption === true ? {} : svgrOption)] : []),
141
- ...(enableReact ? [react()] : []),
142
- ...reactCompilerPlugin({ command, mode: reactCompiler }),
143
- ...(publicConfig === false || publicConfig == null
144
- ? []
145
- : [
146
- publicConfigPlugin({
147
- sourceGlob: publicConfig.sourceGlob ?? `config/public-config/${publicConfig.mode}/*`,
148
- dest: publicConfig.dest,
149
- }),
150
- ]),
151
- ...(copyOption ? [copyPlugin(copyOption)] : []),
152
- createHtmlPlugin({
153
- minify: isBuild,
154
- inject: {
155
- data: {
156
- ...htmlData,
157
- PUBLIC_PATH: htmlPublicPath || "",
158
- },
159
- },
160
- }),
161
- ...(isBuild && isHash
162
- ? [
163
- hashDeployPlugin({
164
- rootDir,
165
- buildDirStr,
166
- publicPath,
167
- cleanup: hashCleanup,
168
- }),
169
- ]
170
- : []),
171
- ...(isDev && useHttps ? [basicSsl()] : []),
172
- ...extraPlugins,
173
- ...(isBuild && (onRun || onDone) ? [lifecyclePlugin({ onRun, onDone })] : []),
174
- ];
175
-
176
- const base: UserConfig = {
177
- root: rootDir,
178
- ...(viteBase != null ? { base: viteBase } : {}),
179
- plugins,
180
- ...(enablePublicAssets ? { publicDir: false } : {}),
181
- resolve: {
182
- alias,
183
- },
184
- css: {
185
- preprocessorOptions: {
186
- less: buildLessOptions(less),
187
- },
188
- },
189
- ...(isDev
190
- ? {
191
- server: {
192
- https: useHttps ? {} : undefined,
193
- host: true,
194
- open: openBrowser,
195
- ...(devProxy ? { proxy: devProxy } : {}),
196
- },
197
- }
198
- : {
199
- build: {
200
- outDir: isHash ? `${deployRoot}/${buildDirStr}/` : deployRoot,
201
- assetsDir: "assets",
202
- emptyOutDir: true,
203
- },
204
- }),
205
- };
206
-
207
- let merged = viteOverride ? mergeConfig(base, viteOverride) : base;
208
- if (configure) {
209
- merged = configure(merged);
210
- }
211
- applyJsPublicPathDefine(merged, resolveJsPublicPath(isHash, publicPath, merged));
212
- Object.defineProperty(merged, "buildDirHash", {
213
- value: buildDirStr,
214
- enumerable: false,
215
- configurable: true,
216
- });
217
- return merged as CreateAppViteConfigResult;
218
- }
1
+ import basicSsl from "@vitejs/plugin-basic-ssl";
2
+ import react from "@vitejs/plugin-react";
3
+ import { mergeConfig, type PluginOption, type UserConfig } from "vite";
4
+ import { createHtmlPlugin } from "vite-plugin-html";
5
+
6
+ import { copyPlugin } from "./plugins/copy.ts";
7
+ import { DEFAULT_HASH_DIR_NAME_PATTERN } from "./plugins/hash-dir-name.ts";
8
+ import { createHashBuildDirName, hashDeployPlugin } from "./plugins/hash-deploy.ts";
9
+ import { buildLessOptions } from "./plugins/less-tilde.ts";
10
+ import { lifecyclePlugin } from "./plugins/lifecycle.ts";
11
+ import { publicAssetsPlugin } from "./plugins/public-assets.ts";
12
+ import { publicConfigPlugin } from "./plugins/public-config.ts";
13
+ import { reactCompilerPlugin } from "./plugins/react-compiler.ts";
14
+ import { svgReactPlugin } from "./plugins/svg-react.ts";
15
+
16
+ import type { CreateAppViteConfigOptions, CreateAppViteConfigResult } from "./types.ts";
17
+
18
+ /** 根入口运行时资源前缀,供 JS `fetch` / 动态 URL 使用。与 HTML 子目录 `PUBLIC_PATH` 可能不同。 */
19
+ const JS_PUBLIC_PATH_DEFINE_KEY = "import.meta.env.PUBLIC_PATH";
20
+
21
+ /** 规范化资源 base:空串视为未设置;非空则保证尾 `/`。 */
22
+ function normalizeAssetBase(base: string | undefined): string | undefined {
23
+ if (base == null) return undefined;
24
+ const trimmed = base.trim();
25
+ if (!trimmed) return undefined;
26
+ return trimmed.endsWith("/") ? trimmed : `${trimmed}/`;
27
+ }
28
+
29
+ function ensureTrailingSlash(value: string): string {
30
+ return value.endsWith("/") ? value : `${value}/`;
31
+ }
32
+
33
+ /**
34
+ * JS 可读的根入口前缀。相对 hash 必须用 `./{hash}/`,不能用 Vite `base`(后者保持 `./`)。
35
+ * 非 hash 则跟最终 `config.base`;serve 未设 base 时为 `"/"`。
36
+ */
37
+ function resolveJsPublicPath(isHash: boolean, publicPath: string, config: UserConfig): string {
38
+ if (isHash) return publicPath;
39
+ if (typeof config.base === "string" && config.base.length > 0) {
40
+ return ensureTrailingSlash(config.base);
41
+ }
42
+ return publicPath || "/";
43
+ }
44
+
45
+ function applyJsPublicPathDefine(config: UserConfig, publicPath: string): UserConfig {
46
+ config.define = {
47
+ ...config.define,
48
+ [JS_PUBLIC_PATH_DEFINE_KEY]: JSON.stringify(publicPath),
49
+ };
50
+ return config;
51
+ }
52
+
53
+ /**
54
+ * 组装应用侧 Vite 配置。
55
+ *
56
+ * 合并顺序:`base(options) → mergeConfig(base, vite) → configure(final)`,
57
+ * 之后写入 `import.meta.env.PUBLIC_PATH`(同名 `define` 会被覆盖)。
58
+ *
59
+ * 返回值附带只读 `buildDirHash`(本次 hash 子目录名;未启用时为 `""`)。
60
+ * @public
61
+ */
62
+ export function createAppViteConfig(
63
+ options: CreateAppViteConfigOptions,
64
+ ): CreateAppViteConfigResult {
65
+ const {
66
+ rootDir,
67
+ repositoryRoot,
68
+ command,
69
+ mode,
70
+ alias,
71
+ useHttps = false,
72
+ openBrowser = true,
73
+ hashDeploy = false,
74
+ hashDirName,
75
+ base: baseOption,
76
+ deployRoot: deployRootOption = "dist",
77
+ hashCleanup,
78
+ publicAssets,
79
+ publicConfig,
80
+ copy: copyOption,
81
+ htmlData,
82
+ devProxy,
83
+ reactCompiler = "build-only",
84
+ react: enableReact = true,
85
+ svgr: svgrOption = false,
86
+ less,
87
+ onRun,
88
+ onDone,
89
+ plugins: extraPlugins = [],
90
+ vite: viteOverride,
91
+ configure,
92
+ } = options;
93
+
94
+ const isDev = command === "serve";
95
+ const isBuild = command === "build";
96
+ const isHash = isBuild && Boolean(hashDeploy) && mode !== "development";
97
+ const deployRoot = deployRootOption.replace(/\/+$/, "") || "dist";
98
+ const assetBase = normalizeAssetBase(baseOption);
99
+
100
+ // hashTimestamp 已移除:只有 "datetime" 会改变目录名,出现即报错并给出等价模式串写法;
101
+ // 与默认等价的 "epoch" 忽略即可。避免部署目录名被静默改变。
102
+ const legacyHashTimestamp = (options as { hashTimestamp?: unknown }).hashTimestamp;
103
+ if (legacyHashTimestamp != null && legacyHashTimestamp !== "epoch") {
104
+ throw new Error(
105
+ `[vite-config] hashTimestamp: ${JSON.stringify(
106
+ legacyHashTimestamp,
107
+ )} has been removed; use hashDirName instead (e.g. "hash-timestamp" or "hash-YYYY-MM-DD-HH-mm-ss").`,
108
+ );
109
+ }
110
+
111
+ const buildDirStr = isHash
112
+ ? createHashBuildDirName({
113
+ repositoryRoot: repositoryRoot ?? rootDir,
114
+ hashDirName,
115
+ })
116
+ : "";
117
+ /**
118
+ * 生效的目录名模式串:透传给 hashDeployPlugin,让 cleanup 只识别同一模式串生成的目录。
119
+ * `hashDirName` 不传时即默认模式串。
120
+ */
121
+ const buildDirNamePattern = hashDirName ?? DEFAULT_HASH_DIR_NAME_PATTERN;
122
+ /**
123
+ * HTML / 根入口资源前缀(JS `import.meta.env.PUBLIC_PATH` 用这个)。
124
+ * - hash + 相对:`./{hash}/`(Vite `base` 仍为 `./`,由插件改写根入口)
125
+ * - hash + 绝对 base:`{base}{hash}/`(与 Vite `base` 一致)
126
+ * - 普通 build:`base` 或 `./`
127
+ */
128
+ const publicPath = isHash
129
+ ? `${assetBase ?? "./"}${buildDirStr}/`
130
+ : isBuild
131
+ ? (assetBase ?? "./")
132
+ : "";
133
+ /**
134
+ * Hash 子目录入口相对于自身加载资源;根入口由 hashDeployPlugin 再补 hash 前缀。
135
+ * 绝对 base 则两个入口都使用同一个完整 URL。
136
+ */
137
+ const htmlPublicPath = isHash && publicPath.startsWith("./") ? "./" : publicPath;
138
+ /** 相对 base(含默认 `./`)在 hash 下必须保持 Vite `base: "./"`,否则 `./{hash}/` 会被规范成 `/`。 */
139
+ const isAbsoluteAssetBase =
140
+ assetBase != null &&
141
+ (assetBase.startsWith("https://") ||
142
+ assetBase.startsWith("http://") ||
143
+ assetBase.startsWith("/"));
144
+ const viteBase = isHash
145
+ ? isAbsoluteAssetBase
146
+ ? publicPath
147
+ : "./"
148
+ : isBuild
149
+ ? publicPath
150
+ : undefined;
151
+ const enablePublicAssets = publicAssets !== false;
152
+
153
+ const plugins: PluginOption[] = [
154
+ ...(enablePublicAssets
155
+ ? [publicAssetsPlugin(publicAssets && typeof publicAssets === "object" ? publicAssets : {})]
156
+ : []),
157
+ ...(svgrOption ? [svgReactPlugin(svgrOption === true ? {} : svgrOption)] : []),
158
+ ...(enableReact ? [react()] : []),
159
+ ...reactCompilerPlugin({ command, mode: reactCompiler }),
160
+ ...(publicConfig === false || publicConfig == null
161
+ ? []
162
+ : [
163
+ publicConfigPlugin({
164
+ sourceGlob: publicConfig.sourceGlob ?? `config/public-config/${publicConfig.mode}/*`,
165
+ dest: publicConfig.dest,
166
+ }),
167
+ ]),
168
+ ...(copyOption ? [copyPlugin(copyOption)] : []),
169
+ createHtmlPlugin({
170
+ minify: isBuild,
171
+ inject: {
172
+ data: {
173
+ ...htmlData,
174
+ PUBLIC_PATH: htmlPublicPath || "",
175
+ },
176
+ },
177
+ }),
178
+ ...(isBuild && isHash
179
+ ? [
180
+ hashDeployPlugin({
181
+ rootDir,
182
+ buildDirStr,
183
+ buildDirNamePattern,
184
+ publicPath,
185
+ cleanup: hashCleanup,
186
+ }),
187
+ ]
188
+ : []),
189
+ ...(isDev && useHttps ? [basicSsl()] : []),
190
+ ...extraPlugins,
191
+ ...(isBuild && (onRun || onDone) ? [lifecyclePlugin({ onRun, onDone })] : []),
192
+ ];
193
+
194
+ const base: UserConfig = {
195
+ root: rootDir,
196
+ ...(viteBase != null ? { base: viteBase } : {}),
197
+ plugins,
198
+ ...(enablePublicAssets ? { publicDir: false } : {}),
199
+ resolve: {
200
+ alias,
201
+ },
202
+ css: {
203
+ preprocessorOptions: {
204
+ less: buildLessOptions(less),
205
+ },
206
+ },
207
+ ...(isDev
208
+ ? {
209
+ server: {
210
+ https: useHttps ? {} : undefined,
211
+ host: true,
212
+ open: openBrowser,
213
+ ...(devProxy ? { proxy: devProxy } : {}),
214
+ },
215
+ }
216
+ : {
217
+ build: {
218
+ outDir: isHash ? `${deployRoot}/${buildDirStr}/` : deployRoot,
219
+ assetsDir: "assets",
220
+ emptyOutDir: true,
221
+ },
222
+ }),
223
+ };
224
+
225
+ let merged = viteOverride ? mergeConfig(base, viteOverride) : base;
226
+ if (configure) {
227
+ merged = configure(merged);
228
+ }
229
+ applyJsPublicPathDefine(merged, resolveJsPublicPath(isHash, publicPath, merged));
230
+ Object.defineProperty(merged, "buildDirHash", {
231
+ value: buildDirStr,
232
+ enumerable: false,
233
+ configurable: true,
234
+ });
235
+ return merged as CreateAppViteConfigResult;
236
+ }