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

feat(compat): Allow --compat to be used with bundle command #14848

Closed
wants to merge 1 commit into from

Conversation

arendjr
Copy link

@arendjr arendjr commented Jun 11, 2022

This is the second part of #14846.

The test won't succeed yet, because while this PR allows for passing --compat now, the generated bundle contains Deno's std/node library, which I think should be omitted for this use case, so that the bundle will become runnable on a real Node runtime. This means leaving the imports to Node's built-ins unaltered in the generated bundle, but I haven't found out exactly how to accomplish this. A pointer by one of the Deno maintainers on how to achieve this would be appreciated. Thanks!

@arendjr
Copy link
Author

arendjr commented Jun 11, 2022

Also I’d be curious to hear if we should introduce another CLI flag (--omit-node-std, maybe?) so that users can choose whether the std/node lib is included or not. If it’s included, the resulting bundle should work in Deno (without needing to pass the --compat flag anymore). Without it, it should work in Node.

@bartlomieju
Copy link
Member

@arendjr thank you for this PR, but I'm going to close it without a merge. We're removing --compat mode in #15678 and using npm: specifiers is the way forward for npm compatibility. Thanks for the work and sorry we can't merge it.

@bartlomieju bartlomieju closed this Sep 3, 2022
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 this pull request may close these issues.

2 participants