feat(ssr): support custom directive getSSRProps in optimized compilation

close #5304
This commit is contained in:
Evan You
2022-02-04 08:58:28 +08:00
parent a51f935b72
commit 60cf175d88
14 changed files with 228 additions and 45 deletions

View File

@@ -90,6 +90,10 @@ export const isReservedProp = /*#__PURE__*/ makeMap(
'onVnodeBeforeUnmount,onVnodeUnmounted'
)
export const isBuiltInDirective = /*#__PURE__*/ makeMap(
'bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'
)
const cacheStringFunction = <T extends (str: string) => string>(fn: T): T => {
const cache: Record<string, string> = Object.create(null)
return ((str: string) => {