Skip to content

Commit 4c468eb

Browse files
committed
fix(build): avoid imports to @babel/types in client build of compiler-core
1 parent a137d73 commit 4c468eb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/compiler-core/src/babelUtils.ts

+8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export function walkIdentifiers(
2222
parentStack: Node[] = [],
2323
knownIds: Record<string, number> = Object.create(null)
2424
) {
25+
if (__BROWSER__) {
26+
return
27+
}
28+
2529
const rootExp =
2630
root.type === 'Program' &&
2731
root.body[0].type === 'ExpressionStatement' &&
@@ -81,6 +85,10 @@ export function isReferencedIdentifier(
8185
parent: Node | null,
8286
parentStack: Node[]
8387
) {
88+
if (__BROWSER__) {
89+
return false
90+
}
91+
8492
if (!parent) {
8593
return true
8694
}

0 commit comments

Comments
 (0)