-
Notifications
You must be signed in to change notification settings - Fork 94
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
just-task config.ts should support ESM configs #572
Comments
This is not an issue if you use TS with a commonjs module output, but I've been trying to remove cjs output in new code. |
Any word here? I'm also running into this, and would like to use Just with ESM pretty soon. We have a big monorepo that uses Just everywhere, and we'll eventually need to convert to ESM. |
we are also running into this ATM I managed to make it work with these simple tweaks, it might be more complicated than that ... would be great to ship this. https://github.com/microsoft/fluentui/pull/30582/files#r1499133479 |
Thank you so much that worked, here is a pnpm patch file if anyone wants to add this to their repo fast https://gist.github.com/spookyuser/c295d14654004d2ca7b735dce4e012e9 |
Fixes microsoft#572 Co-authored-by: Martin Hochel <martinhochel@microsoft.com>
Right now, just-scripts only works with commonjs configs. Given how the ecosystem is moving to esm, this will become a point of frustration.
If you have a package with
type: "module"
set right now, you'd expectjust.config.js
to be an ESM.just-task
will throw:I think the require statement can change to an async import, but that will also require some shuffling in the CLI to await on results (or Promise chain.) Plus I'm not sure how this will affect importing commonjs results - that will still need testing.
The text was updated successfully, but these errors were encountered: