Inspirational Error Message:
_You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build._
From:
docs/.vuepress/components/Hello.vue
<template>
<component :is="{
template: '<div> hello </div>'
}" />
</template>
This is one of many use cases where a vuepress doc might "need" the full compiler-included build.
FWIW. Using Nuxt, the following incantation can be added inside the build extend(config,ctx) function:
config.resolve.alias['vue'] = 'vue/dist/vue.common.js'
So maybe I am asking, how does one get vue.common.js loaded within vuepress?
See: https://vuepress.vuejs.org/config/#chainwebpack
You can:
// .vuepress/config.js
chainWebpack(config) {
config.resolve.alias.set('vue', 'vue/dist/vue.common.js')
}
After including the error message, your question is clearer. As @fjc0k mentioned could help, or set vue$ to aviod some unexpected alias parsing.
Brilliant, everyone. Thank you.
Most helpful comment
See: https://vuepress.vuejs.org/config/#chainwebpack
You can: