-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: fork cross-spawn to fix esbuild chaos #25
base: main
Are you sure you want to change the base?
Conversation
esbuild isn't great at bundling for node. it currently produces invalid code by leaving require calls in the esm output, which is far from great. To resolve this, this moves cross-spawn into the repo and converts it to ESM while dropping any logic we weren't making use of.
@@ -1,6 +1,7 @@ | |||
MIT License | |||
|
|||
Copyright (c) 2024 Tinylibs | |||
Copyright (c) 2018 Made With MOXY Lda <[email protected]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the license of cross-spawn. any usage of the original code needs to maintain the copyright
I feel like the better solution to this would be to switch from |
are we sure rollup doesn't have the same problem? under the hood, esbuild is at fault here. it just doesn't transform would be curious if rollup just does the same, i feel like someone pointed me at an issue in their github that suggested it does 👀 |
I know that rollup doesn't have this issue because we just tried to migrate a repo from rollup to rolldown and ran into an issue where the |
I tried rollup locally when we discussed this issue and it didn't have the same problem IIRC, which i thought it would have, so using rollup would definitely be an option, but it requires more setup. |
I sent a PR for rollup here: #35 |
esbuild isn't great at bundling for node. it currently produces invalid code by leaving require calls in the esm output, which is far from great.
To resolve this, this moves cross-spawn into the repo and converts it to ESM while dropping any logic we weren't making use of.
DRAFT until i finish adding the tests for the cross-spawn module.
This may also be discarded if we find a simpler way to get esbuild to output valid code.
cc @bluwy