fix(runtime-core): fix SSR memoery leak due to props normalization cache

fix #2225

The previous props/emits normlaization was caching normalized result per
app instance, but during SSR there is a new app instance created for
every request.

The fix now de-opts props/emits normlaization caching when there are
props/emits declared in global mixins - which is a very rare use case.
This commit is contained in:
Evan You
2020-10-06 15:31:29 -04:00
parent cf2c9f6faa
commit a66e53a24f
4 changed files with 34 additions and 29 deletions

View File

@@ -79,11 +79,11 @@ export interface ComponentInternalOptions {
/**
* @internal
*/
__props?: Record<number, NormalizedPropsOptions>
__props?: NormalizedPropsOptions
/**
* @internal
*/
__emits?: Record<number, ObjectEmitsOptions | null>
__emits?: ObjectEmitsOptions | null
/**
* @internal
*/