Skip to content

Conversation

@geyang
Copy link

@geyang geyang commented Aug 10, 2024

This PR addresses the module type issue #208

Mainly:

  • add type: "module" to package.json so that it works with vite projects without needing the cjs interpolation. In vite, the cjs interpolate does not work consistently when we switch between preview, build, and SSR in dev modes.
  • change the main to "index.esm.js" according to this comment.
  • now type="module", the commitlint export is faulty. Change the .js postfix to .cjs to fix module resolution error.

@staylor let me know if there are issues you want me to address.

@daniel-ac-martin
Copy link

daniel-ac-martin commented Aug 28, 2024

@geyang: Does eslint.js also need to be renamed to eslint.cjs?

@daniel-ac-martin
Copy link

Thinking about it, I think this would be a breaking change, as I don't think CommonJS modules would be able to import this package any more.

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