Error "Cannot read property 'el' of undefined" in production mode
Version
3.0.0
Reproduction link
https://github.com/chenhaihong/vue-next-runtime-core-error
Steps to reproduce
- Use @vue/cli to create a new project.
- Put the code into your page's template
<pre>
<!-- <code class="javascript" v-hljs>const a = 100;</code> -->
<code class="javascript">const a = 100;</code>
</pre>
- run yarn build
- run http-server ./dist
- visit the page
- error happens now.
What is expected?
It should wokr with the same as
<pre>
<code class="javascript">const a = 100;</code>
</pre>
What is actually happening?
runtime-core.esm-bundler.js?5c40:2020 Uncaught TypeError: Cannot read property 'el' of undefined at cloneIfMounted (runtime-core.esm-bundler.js?5c40:2020) at mountChildren (runtime-core.esm-bundler.js?5c40:4178) at mountElement (runtime-core.esm-bundler.js?5c40:4103) at processElement (runtime-core.esm-bundler.js?5c40:4075) at patch (runtime-core.esm-bundler.js?5c40:3988) at mountChildren (runtime-core.esm-bundler.js?5c40:4180) at mountElement (runtime-core.esm-bundler.js?5c40:4103) at processElement (runtime-core.esm-bundler.js?5c40:4075) at patch (runtime-core.esm-bundler.js?5c40:3988) at componentEffect (runtime-core.esm-bundler.js?5c40:4493)