feat(ssr): support custom directive getSSRProps in optimized compilation
close #5304
This commit is contained in:
@@ -12,7 +12,7 @@ return withDirectives(h(comp), [
|
||||
*/
|
||||
|
||||
import { VNode } from './vnode'
|
||||
import { isFunction, EMPTY_OBJ, makeMap } from '@vue/shared'
|
||||
import { isFunction, EMPTY_OBJ, isBuiltInDirective } from '@vue/shared'
|
||||
import { warn } from './warning'
|
||||
import { ComponentInternalInstance, Data } from './component'
|
||||
import { currentRenderingInstance } from './componentRenderContext'
|
||||
@@ -63,10 +63,6 @@ export type Directive<T = any, V = any> =
|
||||
|
||||
export type DirectiveModifiers = Record<string, boolean>
|
||||
|
||||
const isBuiltInDirective = /*#__PURE__*/ makeMap(
|
||||
'bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo'
|
||||
)
|
||||
|
||||
export function validateDirectiveName(name: string) {
|
||||
if (isBuiltInDirective(name)) {
|
||||
warn('Do not use built-in directive ids as custom directive id: ' + name)
|
||||
|
||||
Reference in New Issue
Block a user