Open NullVoxPopuli opened 2 years ago
It looks like esm
is only used for loading the brocfile
❯ git grep esm
README.md:Typescript by default only allows the [ES6 modules](https://nodejs.org/api/esm.html) `import/export` syntax to work
README.md:Broccoli supports [ES6 modules](https://nodejs.org/api/esm.html) via [esm](https://www.npmjs.com/package/esm) for
lib/load_brocfile.ts:import esm from 'esm';
lib/load_brocfile.ts:const esmRequire = esm(module);
lib/load_brocfile.ts: // Load brocfile via esm shim
lib/load_brocfile.ts: brocfile = esmRequire(brocfilePath);
since ember doesn't use brocfiles -- is there a way to opt out of this behavior and prevent esm
from being loaded at all? (it monkey patches node globals, which breaks tools like stackblitz)
Ember-CLI did use Brocfiles at one point (I remember dealing with them) but apparently that was in https://github.com/ember-cli/ember-cli/tree/v0.2.7/blueprints/app/files before the jump to 1.13 when ember-cli became the default. Given that that was 8 years ago I imagine the current Ember-CLI doesn’t need to support that far back … 😉
the
esm
package is the last thing preventing ember from running in webcontainers.See: