vue3-core/packages/vue-compat/src/runtime.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
752 B
TypeScript
Raw Normal View History

2021-04-03 23:55:44 +08:00
// This entry exports the runtime only, and is built as
// `dist/vue.esm-bundler.js` which is used by default for bundlers.
2021-04-27 00:21:36 +08:00
import { createCompatVue } from './createCompatVue'
import { type CompatVue, warn } from '@vue/runtime-core'
2021-04-03 23:55:44 +08:00
const Vue: CompatVue = createCompatVue()
2021-04-07 23:22:56 +08:00
Vue.compile = (() => {
2021-04-03 23:55:44 +08:00
if (__DEV__) {
warn(
`Runtime compilation is not supported in this build of Vue.` +
(__ESM_BUNDLER__
? ` Configure your bundler to alias "vue" to "@vue/compat/dist/vue.esm-bundler.js".`
: __ESM_BROWSER__
? ` Use "vue.esm-browser.js" instead.`
: __GLOBAL__
? ` Use "vue.global.js" instead.`
: ``) /* should not happen */,
2021-04-03 23:55:44 +08:00
)
}
2021-04-07 23:22:56 +08:00
}) as any
export default Vue