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

Fix module resolution in edge cases #2931

Merged
merged 2 commits into from
Jun 3, 2024
Merged

Conversation

vladmoroz
Copy link
Collaborator

@vladmoroz vladmoroz commented Jun 3, 2024

Fixes an issue when certain toolchains would be unable to resolve CJS packages produced by the new build tooling

@@ -12,6 +12,7 @@ async function build(path) {
packages: 'external',
bundle: true,
sourcemap: true,
format: 'cjs',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realise 'cjs' was not the default option, instead it's 'iife':
https://esbuild.github.io/api/#format-iife

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example output diff

image

@vladmoroz vladmoroz merged commit 8939dd7 into main Jun 3, 2024
5 checks passed
@vladmoroz vladmoroz deleted the vlad/specify-cjs-option branch June 3, 2024 15:05
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