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

@@ -19,7 +19,7 @@
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vue.git"
"url": "git+https://github.com/vuejs/vue-next.git"
},
"keywords": [
"vue"
@@ -27,10 +27,11 @@
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vue/issues"
"url": "https://github.com/vuejs/vue-next/issues"
},
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/runtime-core#readme",
"homepage": "https://github.com/vuejs/vue-next/tree/master/packages/runtime-core#readme",
"dependencies": {
"@vue/shared": "3.0.0-alpha.7",
"@vue/reactivity": "3.0.0-alpha.7"
}
}

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'