Vue-next: Version 3.0.0-alpha.4 can't use webpack project

Created on 28 Jan 2020  Â·  5Comments  Â·  Source: vuejs/vue-next

Version

3.0.0-alpha.4

Reproduction link

https://github.com/veaba/ncov/tree/master/client

Steps to reproduce

New version is bad

What is expected?

The version 3.0.0-alpha.4 is bad,
Yesterday's version is good. I noticed that Vue next released a new version of v3.0.0-alpha.4 nine hours ago. This version has problems and cannot be used in webpack projects

What is actually happening?

Will be support webpack project


Error

runtime-dom.esm-bundler.js:12 Uncaught TypeError: parent.appendChild is not a function
    at insert (runtime-dom.esm-bundler.js:12)
    at processCommentNode (runtime-core.esm-bundler.js:1883)
    at patch (runtime-core.esm-bundler.js:1847)
    at render (runtime-core.esm-bundler.js:2828)
    at mount (runtime-core.esm-bundler.js:1411)
    at Object.app.mount (runtime-dom.esm-bundler.js:1074)
    at Module../src/main.js (main.js:4)
    at __webpack_require__ (bootstrap:726)
    at fn (bootstrap:100)
    at Object.0 (draw.js:43)

The webpack project here: https://github.com/veaba/ncov/tree/master/client

Most helpful comment

You need to adapt the mounting code:

-const app = createApp()
+const app = createApp(App)
-app.mount(App, '#app')
+app.mount('#app')

This was one of the breaking changes: https://github.com/vuejs/vue-next/compare/v3.0.0-alpha.3...v3.0.0-alpha.4
Changelog

All 5 comments

alpha 4 =>

image

alpha 3 =>
image

Can't run your repo right now but: have you tried it with an updated verion of @vue/sfc-compiler as well? Your current lockfile still refers to alpha-1:

"@vue/compiler-sfc@^3.0.0-alpha.1":
  version "3.0.0-alpha.1"

Just like vue-template-compiler in Vue 2, this dependency has to be kept in sync with the Vue version that's being used.

Can't run your repo right now but: have you tried it with an updated verion of @vue/sfc-compiler as well? Your current lockfile still refers to alpha-1:

"@vue/compiler-sfc@^3.0.0-alpha.1":
  version "3.0.0-alpha.1"

Just like vue-template-compiler in Vue 2, this dependency has to be kept in sync with the Vue version that's being used.

It seems that vue-next is updated, but @vue/compiler-sfc is not!

@vue/compiler-sfc verson is 3.0.0-alpha.1

rolled back [email protected]

You need to adapt the mounting code:

-const app = createApp()
+const app = createApp(App)
-app.mount(App, '#app')
+app.mount('#app')

This was one of the breaking changes: https://github.com/vuejs/vue-next/compare/v3.0.0-alpha.3...v3.0.0-alpha.4
Changelog

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pearofducks picture pearofducks  Â·  3Comments

Jexordexan picture Jexordexan  Â·  4Comments

corkt picture corkt  Â·  4Comments

anandkumarram picture anandkumarram  Â·  4Comments

mika76 picture mika76  Â·  3Comments