Skip to content

Commit

Permalink
fix: ensure Dev Tool is enabled in Vue 3 runtime (#5788)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sodatea committed Aug 14, 2020
1 parent 0146001 commit 7458103
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/@vue/cli-service/__tests__/serveVue3.spec.js
Expand Up @@ -13,6 +13,7 @@ test('serve with Vue 3', async () => {
async ({ page, nextUpdate, helpers }) => {
const msg = `Welcome to Your Vue.js App`
expect(await helpers.getText('h1')).toMatch(msg)
expect(await page.evaluate(() => window.__VUE__)).toBeDefined()

// test hot reload
const file = await project.read(`src/App.vue`)
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-service/lib/config/base.js
Expand Up @@ -121,7 +121,7 @@ module.exports = (api, options) => {
'vue$',
options.runtimeCompiler
? 'vue/dist/vue.esm-bundler.js'
: '@vue/runtime-dom'
: 'vue/dist/vue.runtime.esm-bundler.js'
)

webpackConfig.module
Expand Down

0 comments on commit 7458103

Please sign in to comment.