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

build: switch from CommonJS to ESM #290

Merged
merged 2 commits into from
Nov 18, 2024
Merged

build: switch from CommonJS to ESM #290

merged 2 commits into from
Nov 18, 2024

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Nov 18, 2024

  • Add type: module to package.json.
  • Update next.config.js, cypress.config.ts and postcss.config.js to use import/export.
  • Replace ts-node with tsx for running TypeScript in Node.
  • Update tsconfig.json to use esnext.
  • Update Dockerfile to use the latest Node 20.

The changes here should work with Node 20.11 or later.

@eatyourgreens eatyourgreens marked this pull request as draft November 18, 2024 10:17
@eatyourgreens eatyourgreens force-pushed the esm branch 8 times, most recently from 7a52556 to b8d9be2 Compare November 18, 2024 11:47
@eatyourgreens eatyourgreens marked this pull request as ready for review November 18, 2024 11:53
- Add `type: module` to `package.json`.
- Update `next.config.js`, `cypress.config.ts` and `postcss.config.js` to use `import/export`.
- Replace `ts-node` with `tsx` for running TypeScript in Node.
- Update `tsconfig.json` to use `esnext`.
- Update `Dockerfile` to use the latest Node 20.
Copy link
Contributor

@martinjrobins martinjrobins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @eatyourgreens, LGTM

@martinjrobins martinjrobins merged commit c11d5e1 into main Nov 18, 2024
4 checks passed
@martinjrobins martinjrobins deleted the esm branch November 18, 2024 17:58
alasdairwilson added a commit that referenced this pull request Jan 14, 2025
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.

None yet

2 participants