-
Notifications
You must be signed in to change notification settings - Fork 134
ESM support for core and all plugins #259
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
Conversation
🦋 Changeset detectedLatest commit: 2270f77 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest changes of this PR are not available as alpha, since there are no linked |
e30907e to
ab2ecc7
Compare
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/theguild/envelop/Bo3FnuYqYotAYJCG5EYMmEZvWMGT |
ce5a34b to
beba812
Compare
|
Thank you @PabloSzx ! |
|
@dotansimha I can add an example in another PR that uses esm, but without an example is basically checking if neither the source code and .mjs files don't have any "require", that includes require(, require.resolve, require.cache etc |
I see, thank you! Maybe you can add as part of this PR, an example add under |
There is something tricky to have in mind, if we want the example to work as a real world example or an example as integration testing that imports every plugin to check if ESM doesn't break |
If possible, I would like to see this example as a solution for both, what do you think? is it something we can have here? I mean, just HTTP+Helix+Envelop and ESM configured. |
I don't think it makes sense for a real world example to import every plugin in the monorepo |
|
and the other thing that applies to some of the other projects, just running an example with ESM doesn't ensure that everything works as expected, since the example would have to run everything since a require could be inside a function, a manual check of no "require"s in the source code and mjs files is required and I did in all the PRs I made, and the ones that are set as "draft pr" I'm waiting for a response of my comments since they will require some refactors that I would say are outside of the scope of just "ESM support" |
|
@PabloSzx I think a single simple example of both ESM and CommonJS, not testing every plugin, for each repo, would give us enough confidence. |
✅ Benchmark Results |
Description
ESM Support
Type of change
How Has This Been Tested?
Test Environment:
Checklist: