Skip to content

Commit 29173ce

Browse files
committed
fix: ensure scopes are crawled before stripping types
1 parent fab1b86 commit 29173ce

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.changeset/some-phones-train.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"marko": patch
3+
"@marko/runtime-tags": patch
4+
"@marko/compiler": patch
5+
---
6+
7+
Ensure scopes are crawled before stripping types.

packages/compiler/src/babel-plugin/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ function getMarkoFile(code, fileOpts, markoOpts) {
223223
});
224224

225225
parseMarko(file);
226+
file.path.scope.crawl(); // Initialize bindings.
226227

227228
if (isSource) {
228229
if (markoOpts.stripTypes) {
@@ -231,8 +232,6 @@ function getMarkoFile(code, fileOpts, markoOpts) {
231232
return file;
232233
}
233234

234-
file.path.scope.crawl(); // Initialize bindings.
235-
236235
const rootMigrators = [];
237236
for (const id in taglibLookup.taglibsById) {
238237
for (const migrator of taglibLookup.taglibsById[id].migrators) {

0 commit comments

Comments
 (0)