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

breaking: Update exports configuration #120

Merged
merged 6 commits into from
Oct 5, 2023

Conversation

jgarber623
Copy link
Owner

This package is meant to be used in a browser. Browsers use ESM modules. So, we should configure package.json to flag up that this is a module.

That required a couple of changes:

  • add "type": "module" to package.json,
  • consequently, rewrite eslint.config.js to use ESM stuff,
  • not entirely necessary, but whatever, rename .mjs files to .js,
  • use self-reference to import package in test suite, and
  • use exports config (documentation) in package.json to define ESM and CommonJS entrypoints

This is a new(er) style of defining the package's exported files.

Gonna keep the `browser` value in there for now since it's officially
in the `package.json` documentation, but tbh I'm not entirely sure what
might use that.
@jgarber623 jgarber623 self-assigned this Oct 5, 2023
@jgarber623
Copy link
Owner Author

Oh, CI's gonna break on this one. The next PR is going to update the ESLint configuration which will address the issues.

@jgarber623 jgarber623 merged commit 2488184 into main Oct 5, 2023
@jgarber623 jgarber623 deleted the update-exports-configuration branch October 5, 2023 16:57
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.

1 participant