runtime.ts 725 B

1234567891011121314151617181920212223
  1. // This entry exports the runtime only, and is built as
  2. // `dist/vue.esm-bundler.js` which is used by default for bundlers.
  3. import { createCompatVue } from './createCompatVue'
  4. import { warn } from '@vue/runtime-core'
  5. const Vue = createCompatVue()
  6. Vue.compile = (() => {
  7. if (__DEV__) {
  8. warn(
  9. `Runtime compilation is not supported in this build of Vue.` +
  10. (__ESM_BUNDLER__
  11. ? ` Configure your bundler to alias "vue" to "@vue/compat/dist/vue.esm-bundler.js".`
  12. : __ESM_BROWSER__
  13. ? ` Use "vue.esm-browser.js" instead.`
  14. : __GLOBAL__
  15. ? ` Use "vue.global.js" instead.`
  16. : ``) /* should not happen */,
  17. )
  18. }
  19. }) as any
  20. export default Vue