Skip to content

Commit d8a786f

Browse files
fix: supress Vite out dir warning
1 parent b33e827 commit d8a786f

File tree

3 files changed

+55
-24
lines changed

3 files changed

+55
-24
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,10 @@
104104
"typescript": "^5.5.3",
105105
"unbuild": "^3.0.0-rc.6",
106106
"vitest": "^2.0.1"
107+
},
108+
"pnpm": {
109+
"patchedDependencies": {
110+
"vite@5.3.3": "patches/vite@5.3.3.patch"
111+
}
107112
}
108113
}

patches/vite@5.3.3.patch

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/dist/node/chunks/dep-CzJTQ5q7.js b/dist/node/chunks/dep-CzJTQ5q7.js
2+
index ae55745c78a34eaf9bca42a9c1b82cca0d04086c..1bfb706d480a6cd7241db299782f48a4f33864b9 100644
3+
--- a/dist/node/chunks/dep-CzJTQ5q7.js
4+
+++ b/dist/node/chunks/dep-CzJTQ5q7.js
5+
@@ -66746,16 +66746,6 @@ assetFileNames isn't equal for every build.rollupOptions.output. A single patter
6+
colors$1.yellow(`
7+
(!) Experimental legacy.buildSsrCjsExternalHeuristics and ssr.format were be removed in Vite 5.
8+
The only SSR Output format is ESM. Find more information at https://github.com/vitejs/vite/discussions/13816.
9+
-`)
10+
- );
11+
- }
12+
- const resolvedBuildOutDir = normalizePath$3(
13+
- path$m.resolve(resolved.root, resolved.build.outDir)
14+
- );
15+
- if (isParentDirectory(resolvedBuildOutDir, resolved.root) || resolvedBuildOutDir === resolved.root) {
16+
- resolved.logger.warn(
17+
- colors$1.yellow(`
18+
-(!) build.outDir must not be the same directory of root or a parent directory of root as this could cause Vite to overwriting source files with build outputs.
19+
`)
20+
);
21+
}

pnpm-lock.yaml

Lines changed: 29 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)