From 405629dc357c22e0a7479a9d4df0ee6982f42e53 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 17 Aug 2022 16:44:36 +0200 Subject: [PATCH] fix(nuxt): use `vue-devtools-stub` to mock `@vue/devtools-api` for both cjs + esm (#6713) --- packages/nuxt/package.json | 1 + packages/nuxt/src/core/nitro.ts | 2 +- test/fixtures/basic/pages/index.vue | 3 +++ yarn.lock | 8 ++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index f2a761c561..d7a84734da 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -68,6 +68,7 @@ "untyped": "^0.4.5", "vue": "^3.2.37", "vue-bundle-renderer": "^0.4.2", + "vue-devtools-stub": "^0.1.0", "vue-router": "^4.1.3" }, "devDependencies": { diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index c3993ec3d4..2de2d3db6c 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -82,7 +82,7 @@ export async function initNitro (nuxt: Nuxt) { '@vue/compiler-core': 'unenv/runtime/mock/proxy', '@vue/compiler-dom': 'unenv/runtime/mock/proxy', '@vue/compiler-ssr': 'unenv/runtime/mock/proxy', - '@vue/devtools-api': 'unenv/runtime/mock/proxy-cjs', + '@vue/devtools-api': 'vue-devtools-stub', // Paths '#paths': resolve(distDir, 'core/runtime/nitro/paths'), diff --git a/test/fixtures/basic/pages/index.vue b/test/fixtures/basic/pages/index.vue index bc8f28632e..69856bb302 100644 --- a/test/fixtures/basic/pages/index.vue +++ b/test/fixtures/basic/pages/index.vue @@ -21,8 +21,11 @@