-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
I found at least one offensive line here:
node-loader-babel/lib/node-loader-babel.js
Lines 46 to 48 in 4d53080
| // Maybe a shaky assumption | |
| // TODO: look at babel config to see whether it will output ESM/CJS or other formats | |
| format: "module", |
If I replace the format definition with format: /\.cjs$/.test(filename) ? "commonjs" : "module", it works for me so I assume something was overlooked here. This may not be the best way to handle this but at least it shows I can fix it to work for my use case.
If I do not do that, I get tons of errors similar to SyntaxError: The requested module '#foo' does not provide an export named bar when importing some commonjs module. I am also using @node-loader/import-maps so maybe there is some interdependence there?
Metadata
Metadata
Assignees
Labels
No labels