Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove esm package #498

Open
NullVoxPopuli opened this issue Jun 1, 2022 · 2 comments · May be fixed by #499
Open

Remove esm package #498

NullVoxPopuli opened this issue Jun 1, 2022 · 2 comments · May be fixed by #499

Comments

@NullVoxPopuli
Copy link

the esm package is the last thing preventing ember from running in webcontainers.

See:

@NullVoxPopuli
Copy link
Author

NullVoxPopuli commented Jun 1, 2022

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)

@acorncom
Copy link

acorncom commented Jun 3, 2022

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 … 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants