Skip to content

Commit d6fad31

Browse files
committed
chore: Update Vite configuration to disable rollupTypes in CI environments
- Added a check for CI environments to disable rollupTypes during DTS generation, preventing API Extractor issues while maintaining functionality for local development builds.
1 parent 61cf6b0 commit d6fad31

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

vite.config.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import viteTsconfigPaths from "vite-tsconfig-paths";
99
export default defineConfig(({ command, mode }) => {
1010
const isWatchMode = command === "build" && process.env.VITE_WATCH === "true";
1111
const isDev = mode === "development" || isWatchMode;
12+
const isCI = process.env.CI === "true" || process.env.GITHUB_ACTIONS === "true";
1213

1314
return {
1415
plugins: [
@@ -27,9 +28,10 @@ export default defineConfig(({ command, mode }) => {
2728
dts({
2829
insertTypesEntry: true,
2930
/**
30-
* Optimize DTS generation for watch mode
31+
* Disable rollupTypes in CI environments to avoid API Extractor issues
32+
* but keep it enabled for local development builds
3133
*/
32-
rollupTypes: !isWatchMode
34+
rollupTypes: !isCI && !isWatchMode
3335
})
3436
].filter(Boolean),
3537

0 commit comments

Comments
 (0)