diff --git a/packages/compiler-dom/src/index.ts b/packages/compiler-dom/src/index.ts index ee31f927..3b3d002d 100644 --- a/packages/compiler-dom/src/index.ts +++ b/packages/compiler-dom/src/index.ts @@ -28,4 +28,3 @@ export function compile( } export * from '@vue/compiler-core' -export * from './tagConfig' diff --git a/packages/compiler-dom/src/parserOptionsMinimal.ts b/packages/compiler-dom/src/parserOptionsMinimal.ts index 09cbcb0d..0a0f25bb 100644 --- a/packages/compiler-dom/src/parserOptionsMinimal.ts +++ b/packages/compiler-dom/src/parserOptionsMinimal.ts @@ -5,8 +5,7 @@ import { Namespaces, NodeTypes } from '@vue/compiler-core' -import { isVoidTag, isHTMLTag, isSVGTag } from './tagConfig' -import { makeMap } from '@vue/shared' +import { makeMap, isVoidTag, isHTMLTag, isSVGTag } from '@vue/shared' const isRawTextContainer = /*#__PURE__*/ makeMap( 'style,iframe,script,noscript', diff --git a/packages/runtime-dom/src/index.ts b/packages/runtime-dom/src/index.ts index 3c66e947..865553a2 100644 --- a/packages/runtime-dom/src/index.ts +++ b/packages/runtime-dom/src/index.ts @@ -7,8 +7,7 @@ import { import { nodeOps } from './nodeOps' import { patchProp } from './patchProp' // Importing from the compiler, will be tree-shaken in prod -import { isHTMLTag, isSVGTag } from '@vue/compiler-dom' -import { isFunction, isString } from '@vue/shared' +import { isFunction, isString, isHTMLTag, isSVGTag } from '@vue/shared' const { render: baseRender, createApp: baseCreateApp } = createRenderer({ patchProp, diff --git a/packages/compiler-dom/src/tagConfig.ts b/packages/shared/src/domTagConfig.ts similarity index 90% rename from packages/compiler-dom/src/tagConfig.ts rename to packages/shared/src/domTagConfig.ts index 6bc4dc11..741774a1 100644 --- a/packages/compiler-dom/src/tagConfig.ts +++ b/packages/shared/src/domTagConfig.ts @@ -1,4 +1,6 @@ -import { makeMap } from '../../shared/src/makeMap' +// These tag configs are shared between compiler-dom and runtime-dom, so they +// must be extracted in shared to avoid creating a dependency between the two. +import { makeMap } from './makeMap' // https://developer.mozilla.org/en-US/docs/Web/HTML/Element const HTML_TAGS = diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 860cd6e9..137f38fe 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -2,8 +2,9 @@ import { makeMap } from './makeMap' export { makeMap } export * from './patchFlags' -export { isGloballyWhitelisted } from './globalsWhitelist' -export { generateCodeFrame } from './codeframe' +export * from './globalsWhitelist' +export * from './codeframe' +export * from './domTagConfig' export const EMPTY_OBJ: { readonly [key: string]: any } = __DEV__ ? Object.freeze({})