feat(build): provide more specific warnings for runtime compilation
close #1004
This commit is contained in:
@@ -451,9 +451,15 @@ function finishComponentSetup(
|
||||
/* istanbul ignore if */
|
||||
if (!compile && Component.template) {
|
||||
warn(
|
||||
`Component provides template but the build of Vue you are running ` +
|
||||
`does not support runtime template compilation. Either use the ` +
|
||||
`full build or pre-compile the template using Vue CLI.`
|
||||
`Component provided template option but ` +
|
||||
`runtime compilation is not supported in this build of Vue.` +
|
||||
(__ESM_BUNDLER__
|
||||
? ` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
|
||||
: __ESM_BROWSER__
|
||||
? ` Use "vue.esm-browser.js" instead.`
|
||||
: __GLOBAL__
|
||||
? ` Use "vue.global.js" instead.`
|
||||
: ``) /* should not happen */
|
||||
)
|
||||
} else {
|
||||
warn(`Component is missing template or render function.`)
|
||||
|
||||
Reference in New Issue
Block a user