Fix symbol name for cjs2esm

This commit is contained in:
Jarred Sumner
2021-09-16 18:46:27 -07:00
parent 6352e95d0f
commit 3be2571a31

View File

@@ -1964,6 +1964,7 @@ pub const Parser = struct {
if (p.options.transform_require_to_import) {
var args = p.allocator.alloc(Expr, 2) catch unreachable;
wrapper_expr = p.callRuntime(logger.Loc.Empty, "__cJS2eSM", args);
p.resolveGeneratedSymbol(&p.runtime_imports.__cJS2eSM.?);
// Disable HMR if we're wrapping it in CommonJS
// It's technically possible to support this.