Skip to content

Commit

Permalink
fix(vitest-environment): handle different entry format
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Dec 19, 2023
1 parent 6c84c9e commit 5c07bb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ export async function getVitestConfigFromNuxt(
transform(code, id) {
if (id.match(/nuxt(3|-nightly)?\/.*\/entry\./)) {
return code.replace(
/(?<!vueAppPromise = )entry\(\)\.catch/,
'Promise.resolve().catch'
/(?<!vueAppPromise = )entry\(\)/,
'Promise.resolve()'
)
}
},
Expand Down

0 comments on commit 5c07bb4

Please sign in to comment.