karol-f / vue-custom-element

Vue Custom Element - Web Components' Custom Elements for Vue.js
https://karol-f.github.io/vue-custom-element/
MIT License
1.97k stars 187 forks source link

v3.3.0 introduced bug with timing of custom element rendering #254

Open craigrileyuk opened 3 years ago

craigrileyuk commented 3 years ago

I feel like this is perhaps something of an edge case, but it did break my VCE project.

Basically, v3.3.0 seems to change when the HTML of the custom element is rendered. In previous versions, the HTML for a dynamically created element was available instantly, whereas in v3.3.0, there's a delay.

https://codesandbox.io/s/romantic-firefly-hmzyl?file=/src/App.vue

Try changing the VCE version in the dependency list and observe how the output (see App.vue line 17) in the browser's dev console changes.

karol-f commented 3 years ago

3.3.0 introduced promise based resolving - so it's async now. Like setTimeout(0).

We can think about solving it.