Skip to content

Conversation

@tani
Copy link
Contributor

@tani tani commented May 3, 2025

Hi, there. Thank you for the awesome project! I'd like to propose the following change:

  • What: add "exports" field to package.json, mapping ESM to ./dist/module.esm.js and CJS to ./dist/module.cjs.js
  • Why: tools like Vite default to main when exports is absent, causing CJS to be used in dev server and breaking default export detection.
  • How: update package.json, built & tested locally with Vite and Node (import/require).
  • Backward compatibility: keeps existing main & module fields.

tani added 2 commits May 3, 2025 11:18
What: add "exports" field to package.json, mapping ESM to ./dist/module.esm.js and CJS to ./dist/module.cjs.js
Why: tools like Vite default to main when exports is absent, causing CJS to be used in dev server and breaking default export detection.
How: update package.json, built & tested locally with Vite and Node (import/require).
Backward compatibility: keeps existing main & module fields.
@calebporzio calebporzio merged commit 2dd1556 into alpinejs:main Aug 31, 2025
1 check passed
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