Skip to content

Commit 69c7166

Browse files
committed
fix: resolve
So the reason stuff kept breaking was that Vite 6 changed how resolve.conditions worked to support the environment API. This fixes our Vite config, so that we now load client-side Svelte on the client.
1 parent 9135840 commit 69c7166

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

apps/petal-notes/vite.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import browserslist from "browserslist";
55
import browserslistToEsbuild from "browserslist-to-esbuild";
66
import { browserslistToTargets } from "lightningcss";
77
import * as path from "node:path";
8+
import process from "node:process";
89
import {
910
coverageConfigDefaults,
1011
defaultExclude,
@@ -31,9 +32,10 @@ export default defineConfig({
3132
},
3233
},
3334

34-
// Tell Vitest to use the `browser` entry points in `package.json` files, even though it's running in Node
35-
resolve: {
36-
conditions: process.env["VITEST"] === undefined ? [] : ["browser"],
35+
ssr: {
36+
resolve: {
37+
conditions: process.env["VITEST"] === undefined ? [] : ["browser"],
38+
},
3739
},
3840

3941
test: {

0 commit comments

Comments
 (0)