runtime.ts 737 B

12345678910111213141516171819202122232425
  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 { initDev } from './dev'
  4. import { warn } from '@vue/runtime-dom'
  5. if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
  6. initDev()
  7. }
  8. export * from '@vue/runtime-dom'
  9. export const compile = () => {
  10. if (__DEV__) {
  11. warn(
  12. `Runtime compilation is not supported in this build of Vue.` +
  13. (__ESM_BUNDLER__
  14. ? ` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  15. : __ESM_BROWSER__
  16. ? ` Use "vue.esm-browser.js" instead.`
  17. : __GLOBAL__
  18. ? ` Use "vue.global.js" instead.`
  19. : ``) /* should not happen */
  20. )
  21. }
  22. }