Skip to content

Commit 7458103

Browse files
authored
fix: ensure Dev Tool is enabled in Vue 3 runtime (#5788)
The old alias `@vue/runtime-dom` was introduced because webpack HMR has trouble with pure re-exports. Now that the `vue.runtime.esm-bundler.js` file also includes a call to `initDev`, it's no longer an issue. This also enables Dev Tool in Vue 3 runtime. Fixes #5785
1 parent 0146001 commit 7458103

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/@vue/cli-service/__tests__/serveVue3.spec.js

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ test('serve with Vue 3', async () => {
1313
async ({ page, nextUpdate, helpers }) => {
1414
const msg = `Welcome to Your Vue.js App`
1515
expect(await helpers.getText('h1')).toMatch(msg)
16+
expect(await page.evaluate(() => window.__VUE__)).toBeDefined()
1617

1718
// test hot reload
1819
const file = await project.read(`src/App.vue`)

packages/@vue/cli-service/lib/config/base.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ module.exports = (api, options) => {
121121
'vue$',
122122
options.runtimeCompiler
123123
? 'vue/dist/vue.esm-bundler.js'
124-
: '@vue/runtime-dom'
124+
: 'vue/dist/vue.runtime.esm-bundler.js'
125125
)
126126

127127
webpackConfig.module

0 commit comments

Comments
 (0)