feat(compiler-sfc): export resolveTemplateUsageCheckString for HMR plugin use (#4908)

This commit is contained in:
ygj6 2021-11-26 11:58:14 +08:00 committed by GitHub
parent 6d46b36e7c
commit c61baac75a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1960,7 +1960,7 @@ function getObjectOrArrayExpressionKeys(value: Node): string[] {
const templateUsageCheckCache = createCache<string>() const templateUsageCheckCache = createCache<string>()
function resolveTemplateUsageCheckString(sfc: SFCDescriptor) { export function resolveTemplateUsageCheckString(sfc: SFCDescriptor) {
const { content, ast } = sfc.template! const { content, ast } = sfc.template!
const cached = templateUsageCheckCache.get(content) const cached = templateUsageCheckCache.get(content)
if (cached) { if (cached) {

View File

@ -2,7 +2,7 @@
export { parse } from './parse' export { parse } from './parse'
export { compileTemplate } from './compileTemplate' export { compileTemplate } from './compileTemplate'
export { compileStyle, compileStyleAsync } from './compileStyle' export { compileStyle, compileStyleAsync } from './compileStyle'
export { compileScript } from './compileScript' export { compileScript, resolveTemplateUsageCheckString } from './compileScript'
export { rewriteDefault } from './rewriteDefault' export { rewriteDefault } from './rewriteDefault'
export { export {
shouldTransform as shouldTransformRef, shouldTransform as shouldTransformRef,