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

The export name "__esModule" is reserved and cannot be used (it's needed as an export marker when converting ES module syntax to CommonJS) #92

Closed
moltar opened this issue Jun 10, 2021 · 4 comments

Comments

@moltar
Copy link

moltar commented Jun 10, 2021

Getting the following error:

The export name "__esModule" is reserved and cannot be used (it's needed as an export marker when converting ES module syntax to CommonJS)

export const __esModule = mod.__esModule;

When using esbuild.

I think probably related to this: evanw/esbuild#1338

Any ideas?

@jawj
Copy link
Owner

jawj commented Jun 10, 2021

Hmm. It's not immediately obviously to be whether this is a problem with gen-esm-wrapper, which is run as the last build step, or with how we're using it here, or with esbuild itself.

@bjornstar
Copy link

This should be fixed with gen-esm-wrapper@1.1.2, could you give it a try?

jawj added a commit that referenced this issue Jun 11, 2021
@jawj
Copy link
Owner

jawj commented Jun 11, 2021

Thanks @bjornstar, that certainly seems to get rid of the __esModule export.

@jawj
Copy link
Owner

jawj commented Jun 11, 2021

This change is now published in 4.0.3.

@jawj jawj closed this as completed Jun 11, 2021
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

No branches or pull requests

3 participants