Skip to content

Commit 3831454

Browse files
authored
fix(config): patch ssr.resolve.conditions to remove import (#1732)
1 parent 08f8ee2 commit 3831454

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ export async function getVitestConfigFromNuxt(
215215
},
216216
}
217217
},
218+
configResolved(config) {
219+
// https://github.com/nuxt/test-utils/issues/1635
220+
if (config.ssr.resolve?.conditions) {
221+
config.ssr.resolve.conditions = config.ssr.resolve.conditions.filter(x => x !== 'import')
222+
}
223+
},
218224
},
219225
],
220226
} satisfies ViteUserConfig,

0 commit comments

Comments
 (0)