Currently we explicitly trace CommonJS for Node.js import map workflows. We should instead make this a generation option - commonJS: true | false and by default it should be false.
When CommonJS is not enabled, we should then have a nice error that gets thrown as soon as CommonJS is traced:
throw new Error(`Unable to trace ${url}, as it is a CommonJS module. To enable CommonJS tracing set generatorOpts.commonJS = true`)
Currently we explicitly trace CommonJS for Node.js import map workflows. We should instead make this a generation option -
commonJS: true | false
and by default it should befalse
.When CommonJS is not enabled, we should then have a nice error that gets thrown as soon as CommonJS is traced: