I'm trying to use vue-fragment in my App.vue when I'm prerendering my app. My App.vue looks like this:
<template>
<fragment>
<p>Test.</p>
</fragment>
</template>
<script>
import { Fragment } from 'vue-fragment'
export default {
name: 'App',
components: {
Fragment
}
}
</script>
However, whenever I load index.html in my built dist directory, I get this error:
TypeError: Cannot read property 'insertBefore' of null
at a.mounted (vue-fragment.esm.js:1)
at Ht (vue.esm.js:1863)
at nn (vue.esm.js:4203)
at Object.insert (vue.esm.js:3141)
at x (vue.esm.js:6322)
at xn.__patch__ (vue.esm.js:6541)
at xn.t._update (vue.esm.js:3929)
at xn.hn.before (vue.esm.js:4050)
at hn.get (vue.esm.js:4453)
at new hn (vue.esm.js:4442)
I'm trying to use vue-fragment in my App.vue when I'm prerendering my app. My App.vue looks like this:
However, whenever I load index.html in my built dist directory, I get this error:
And then none of the Vue js seems to work at all.