Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix: fix build errors in webpack5 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwusanyu-c authored Aug 27, 2023
1 parent eb0ff58 commit be2d24b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/sub-style/src/inject/inject-api-custom-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export function injectApiCustomElement(
) {
if (node.type === 'Identifier'
&& node.name === 'VueElement'
&& parent
&& parent.type === 'ClassDeclaration')
isVueElementIdentifier = true

Expand All @@ -109,6 +110,7 @@ export function injectApiCustomElement(

if (node.type === 'Identifier'
&& node.name === '_applyStyles'
&& parent
&& parent.type === 'ClassMethod'
&& isVueElementIdentifier
&& isBaseClassIdentifier) {
Expand Down
1 change: 1 addition & 0 deletions packages/sub-style/src/inject/inject-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function injectToComponent(
parent: FunctionDeclaration,
) {
if (node.type === 'Identifier'
&& parent
&& parent.type === 'FunctionDeclaration'
&& node.name === 'createComponentInstance')
isCreateComponentInstance = true
Expand Down
2 changes: 2 additions & 0 deletions packages/sub-style/src/inject/inject-render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export function injectToRenderer(
isComponentUpdateFnIdentifier = true

if (isComponentUpdateFnIdentifier
&& parent
&& parent.type === 'VariableDeclarator'
&& node.type === 'Identifier'
&& node.name === 'subTree') {
Expand All @@ -45,6 +46,7 @@ export function injectToRenderer(
isUnmountIdentifier = true

if (isUnmountIdentifier
&& parent
&& parent.type === 'CallExpression'
&& node.type === 'Identifier'
&& node.name === 'unmountComponent') {
Expand Down
1 change: 1 addition & 0 deletions packages/v-model/src/inject-patch-prop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function injectPatchProp(
) {
if ((node as Identifier).type === 'Identifier'
&& (node as Identifier).name === 'patchProp'
&& parent
&& parent.type === 'VariableDeclarator')
isPatchPropIdentifier = true

Expand Down

0 comments on commit be2d24b

Please sign in to comment.