Skip to content

Commit

Permalink
fix: support transpiling nuxt nightly releases
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Nov 29, 2023
1 parent 2a18546 commit c63f69c
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 @@ -107,7 +107,7 @@ export async function getVitestConfigFromNuxt(
deps: {
inline: [
// vite-node defaults
/\/node_modules\/(.*\/)?(nuxt|nuxt3)\//,
/\/node_modules\/(.*\/)?(nuxt|nuxt3|nuxt-nightly)\//,
/^#/,
// additional deps
'@nuxt/test-utils',
Expand All @@ -126,7 +126,7 @@ export async function getVitestConfigFromNuxt(
name: 'disable-auto-execute',
enforce: 'pre',
transform(code, id) {
if (id.match(/nuxt3?\/.*\/entry\./)) {
if (id.match(/nuxt(3|-nightly)?\/.*\/entry\./)) {
return code.replace(
/(?<!vueAppPromise = )entry\(\)\.catch/,
'Promise.resolve().catch'
Expand Down

0 comments on commit c63f69c

Please sign in to comment.