Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Convert package to ESM #22

Closed
9 tasks
nzakas opened this issue May 7, 2021 · 0 comments · Fixed by #24
Closed
9 tasks

Convert package to ESM #22

nzakas opened this issue May 7, 2021 · 0 comments · Fixed by #24

Comments

@nzakas
Copy link
Member

nzakas commented May 7, 2021

To convert this package from CommonJS to ECMAScript modules (ESM):

  • Add type: module to package.json
  • Convert files in lib to ESM
  • Convert files in tests/lib to ESM
  • Upgrade Mocha
  • Create build script in package.json to generate CommonJS file (.cjs) in dist directory (use Rollup)
  • Add dist to .gitignore
  • Run build in prepare script in package.json to ensure build is run at key moments
  • Update package.json so that main points in the CJS file in dist and exports provides both require and import options
  • Update README instructions
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant