Skip to content

Commit

Permalink
fix: remove support for inline: true and avoid inlining vite/vue
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jul 5, 2023
1 parent 3189f2e commit 4d33563
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions src/nuxt-vitest/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,17 @@ export async function getVitestConfigFromNuxt(
],
deps: {
...options.viteConfig.test?.deps,
inline:
options.viteConfig.test?.deps?.inline === true
? true
: [
// vite-node defaults
/\/node_modules\/(.*\/)?(nuxt|nuxt3)\//,
/^#/,
'vite',
// additional deps
'vue',
'vitest-environment-nuxt',
...(options.nuxt.options.build.transpile.filter(
r => typeof r === 'string' || r instanceof RegExp
) as Array<string | RegExp>),
...(options.viteConfig.test?.deps?.inline || []),
],
inline: [
// vite-node defaults
/\/node_modules\/(.*\/)?(nuxt|nuxt3)\//,
/^#/,
// additional deps
'vitest-environment-nuxt',
...(options.nuxt.options.build.transpile.filter(
r => typeof r === 'string' || r instanceof RegExp
) as Array<string | RegExp>),
...(typeof options.viteConfig.test?.deps?.inline !== 'boolean' ? typeof options.viteConfig.test?.deps?.inline : []),
],
},
},
}
Expand Down

0 comments on commit 4d33563

Please sign in to comment.