build: make @vue/shared public

This avoids it being inlined multiple times in esm bundler builds
This commit is contained in:
Evan You
2020-02-29 22:04:42 -05:00
parent e1660f4338
commit bcb2a9b4a6
18 changed files with 88 additions and 68 deletions

View File

@@ -101,15 +101,7 @@ export {
createCommentVNode,
createStaticVNode
} from './vnode'
// Since @vue/shared is inlined into final builds,
// when re-exporting from @vue/shared we need to avoid relying on their original
// types so that the bundled d.ts does not attempt to import from it.
import {
toDisplayString as _toDisplayString,
camelize as _camelize
} from '@vue/shared'
export const toDisplayString = _toDisplayString as (s: unknown) => string
export const camelize = _camelize as (s: string) => string
export { toDisplayString, camelize } from '@vue/shared'
// For integration with runtime compiler
export { registerRuntimeCompiler } from './component'