Skip to content

Conversation

@rebelchris
Copy link
Contributor

@rebelchris rebelchris commented Jan 12, 2026

Summary

Implements Option B (partial migration) for ESM support as discussed in #5278.

Changes

  • ✅ Renamed 14 config files to .cjs extension (babel, jest, postcss, webpack, eslint)
  • ✅ Added "type": "module" to all 9 package.json files
  • ✅ Updated references in tsconfig.eslint.json files
  • ✅ Updated AGENTS.md documentation

Benefits

  • Config files remain CommonJS (.cjs extension)
  • Source code ready for ESM with type: module
  • Minimal risk, easy rollback
  • No Jest upgrade required in this phase
  • 80% of ESM benefits with 20% of the effort

Testing

Please verify:

  • Webapp dev server starts correctly
  • Extension builds successfully
  • Tests still run as expected

Related to #5278


Generated with Claude Code

Preview domain

https://claude-issue-5278-20260112-0817.preview.app.daily.dev

- Rename all config files to .cjs (14 files)
- Add "type": "module" to all package.json files (9 packages)
- Update references in tsconfig.eslint.json files
- Update AGENTS.md documentation

This implements Option B (partial migration) for ESM support:
- Config files remain CommonJS (.cjs extension)
- Source code ready for ESM with type: module
- Minimal risk, easy rollback
- No Jest upgrade required in this phase

Related to #5278

Co-authored-by: Chris Bongers <rebelchris@users.noreply.github.com>
@rebelchris rebelchris requested a review from a team as a code owner January 12, 2026 08:27
@vercel
Copy link

vercel bot commented Jan 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
daily-webapp Ready Ready Preview Jan 13, 2026 6:53am
storybook Ready Ready Preview Jan 13, 2026 6:53am

When 'type: module' is set in package.json, tools like Jest and Webpack
default to looking for .js config files. Since we renamed them to .cjs,
we need to explicitly specify the config file paths using --config flags.

Changes:
- Updated package.json scripts in extension, webapp, and shared to use
  --config flags for jest and webpack
- Updated CircleCI config to specify jest.config.cjs in all test jobs
- Updated extension/AGENTS.md to reference webpack.config.cjs

Co-authored-by: Chris Bongers <rebelchris@users.noreply.github.com>
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