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 extension of output files #42

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

javiertury
Copy link

Declares the package type as module and uses .cjs extension for CommonJS files.

Fixes #41

@javiertury javiertury force-pushed the fix_output_extensions branch from c63d0e8 to f7f4d33 Compare July 23, 2022 14:25
@javiertury javiertury force-pushed the fix_output_extensions branch from f7f4d33 to 1aaa563 Compare July 23, 2022 14:26
@javiertury javiertury changed the title fix esm for vite fix extension of output files Jul 23, 2022
@stelmakhivan
Copy link

@ajaishankar @hpohlmeyer @javiertury @XMLHexagram can you review this and other pull requests?

@Rendez
Copy link

Rendez commented Apr 20, 2023

I believe - correct me if I'm wrong - that this will fail if your project is type=commonjs and you try to require the .cjs entrypoint, because this project is read as type=module by the node resolution.

I've addressed this on my PR: #59, because I even saw your PR.

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.

CommonJS and ESM lack appropriate extensions
3 participants