Create File class for babel helpers (#10575)
* add test * fix: pass File to helper traverser * pass babel.File to helpers.ensure
This commit is contained in:
@@ -134,6 +134,7 @@ function buildHelper(
|
||||
|
||||
if (!esm) {
|
||||
bindings = [];
|
||||
helpers.ensure(helperName, babel.File);
|
||||
for (const dep of helpers.getDependencies(helperName)) {
|
||||
const id = (dependencies[dep] = t.identifier(t.toIdentifier(dep)));
|
||||
tree.body.push(template.statement.ast`
|
||||
|
||||
Reference in New Issue
Block a user