Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions patches/@nuxt__test-utils.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/config.mjs b/dist/config.mjs
index 41a73e237a7ecd0c63985421737f3cf0782391ee..ddc205b22b6912a8770bb9a93dff7abc0f503d29 100644
--- a/dist/config.mjs
+++ b/dist/config.mjs
@@ -33,7 +33,7 @@ async function startNuxtAndGetViteConfig(rootDir = process.cwd(), options = {})
const { buildNuxt, loadNuxt } = await loadKit(rootDir);
const nuxt = await loadNuxt({
cwd: rootDir,
- dev: false,
+ dev: options.overrides?.dev ?? false,
dotenv: defu(options.dotenv, {
cwd: rootDir,
fileName: ".env.test"
11 changes: 8 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ ignoredBuiltDependencies:
- '@parcel/watcher'
- esbuild
- unrs-resolver

patchedDependencies:
'@nuxt/test-utils': patches/@nuxt__test-utils.patch
2 changes: 1 addition & 1 deletion src/plugins/hydration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createUnplugin } from 'unplugin'
import { distDir } from '../dirs'

const INCLUDE_VUE_RE = /\.vue$/
const EXCLUDE_NODE_MODULES = /node_modules/
const EXCLUDE_NODE_MODULES = /node_modules|dist/
const DEFINE_COMPONENT_RE = /defineComponent/
const DEFINE_NUXT_COMPONENT_RE = /defineNuxtComponent/
const skipPath = normalizePath(resolve(distDir, 'runtime/hydration/component.ts'))
Expand Down
3 changes: 3 additions & 0 deletions test/fixtures/basic/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ export default defineNuxtConfig({
modules: [
MyModule,
],
experimental: {
appManifest: false,
},
})
3 changes: 3 additions & 0 deletions vitest.runtime.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default defineVitestProject({
environmentOptions: {
nuxt: {
rootDir: fileURLToPath(new URL('./test/fixtures/basic', import.meta.url)),
overrides: {
dev: true,
},
},
},
},
Expand Down
Loading