fix: add .js extensions to ESM imports - #36
Conversation
Node.js strict ESM requires explicit .js extensions in relative imports. The bundler moduleResolution + verbatimModuleSyntax preserved extensionless paths in the JS output, breaking consumers using Node.js (e.g. Playwright).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (19)
WalkthroughThe PR systematically updates import and export paths across all packages to use explicit Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
.jsextensions to all relative imports across all packages, fixing Node.js strict ESM resolution (e.g. Playwright workers)exportsfield to all package.json files for proper ESM entry point configurationRoot cause
moduleResolution: "bundler"+verbatimModuleSyntax: truemeant TypeScript accepted extensionless relative imports but passed them through unchanged to the JS output. Node.js strict ESM requires explicit.jsextensions, causingERR_MODULE_NOT_FOUNDfor consumers.Test plan
bun run --filter '*' buildpassesbun run --filter '*' testpasses (40 tests)bun run --filter '*' typecheckpasses.jsextensionsSummary by CodeRabbit
exportsfields to package configurations for improved module resolution with modern package consumers.