Skip to content

Commit a52bc2b

Browse files
authored
chore: fix tests for Vite 5 (#286)
1 parent dd18e3b commit a52bc2b

File tree

3 files changed

+99
-343
lines changed

3 files changed

+99
-343
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"rollup-plugin-license": "^2.9.1",
6666
"simple-git-hooks": "^2.9.0",
6767
"tsx": "^3.13.0",
68-
"typescript": "^4.9.5",
68+
"typescript": "^5.2.2",
6969
"unbuild": "2.0.0",
7070
"vite": "^4.4.9",
7171
"vitest": "^0.34.5",

playground/ssr-vue/vite.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const base = '/test/'
1515
globalThis.__vite_test_filename = __filename
1616
globalThis.__vite_test_dirname = __dirname
1717

18-
export default defineConfig(({ command, ssrBuild }) => ({
18+
export default defineConfig(({ command, ssrBuild, isSsrBuild }) => ({
1919
base,
2020
plugins: [
2121
vuePlugin(),
@@ -30,9 +30,9 @@ export default defineConfig(({ command, ssrBuild }) => ({
3030
load(id, options) {
3131
const ssrFromOptions = options?.ssr ?? false
3232
if (id === '@foo') {
33-
// Force a mismatch error if ssrBuild is different from ssrFromOptions
33+
// Force a mismatch error if ssrBuild/isSsrBuild is different from ssrFromOptions
3434
return `export default { msg: '${
35-
command === 'build' && !!ssrBuild !== ssrFromOptions
35+
command === 'build' && !!(ssrBuild ?? isSsrBuild) !== ssrFromOptions
3636
? `defineConfig ssrBuild !== ssr from load options`
3737
: 'hi'
3838
}' }`

0 commit comments

Comments
 (0)