fix: alias dayjs imports to ESM builds for Vite SSR compatibility#743
fix: alias dayjs imports to ESM builds for Vite SSR compatibility#743
Conversation
dayjs CJS default export breaks in Vite SSR module runner. Use rollup output.paths to rewrite dayjs imports to dayjs/esm in ESM output only, keeping CJS output unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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 (3)
📝 WalkthroughWalkthroughThe pull request updates Day.js plugin import statements across multiple files by removing explicit Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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
module.exportsto ESM default export, causingdayjsto beundefinedand.extend()to crashoutput.pathsto rewritedayjs→dayjs/esmanddayjs/plugin/*→dayjs/esm/plugin/*in ESM output onlyTest plan
dayjs/esm/...dayjs(unchanged)dayjsno longerundefined🤖 Generated with Claude Code