From e4f5fffa4a9d4f08668b93cad6a410ccad543541 Mon Sep 17 00:00:00 2001 From: edison Date: Mon, 16 Sep 2024 09:22:21 +0800 Subject: [PATCH] fix: skip checking private properties of typeParameters (#443) --- packages/plugin-vue/src/handleHotUpdate.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue/src/handleHotUpdate.ts b/packages/plugin-vue/src/handleHotUpdate.ts index e589ab3c..af75add0 100644 --- a/packages/plugin-vue/src/handleHotUpdate.ts +++ b/packages/plugin-vue/src/handleHotUpdate.ts @@ -259,7 +259,6 @@ function isEqualAst(prev?: t.Statement[], next?: t.Statement[]): boolean { return prev === next } - // deep equal, but ignore start/end/loc/range/leadingComments/trailingComments/innerComments if (prev.length !== next.length) { return false } @@ -268,6 +267,7 @@ function isEqualAst(prev?: t.Statement[], next?: t.Statement[]): boolean { const prevNode = prev[i] const nextNode = next[i] if ( + // deep equal, but ignore start/end/loc/range/leadingComments/trailingComments/innerComments !deepEqual(prevNode, nextNode, [ 'start', 'end', @@ -276,6 +276,12 @@ function isEqualAst(prev?: t.Statement[], next?: t.Statement[]): boolean { 'leadingComments', 'trailingComments', 'innerComments', + // https://github.com/vuejs/core/issues/11923 + // avoid comparing the following properties of typeParameters + // as it may be imported from 3rd lib and complex to compare + '_ownerScope', + '_resolvedReference', + '_resolvedElements' ]) ) { return false