fix: hack for rspack module federation due to dayjs -> dayjs/esm alias#605
Conversation
🦋 Changeset detectedLatest commit: e60c20d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reached
More reviews will be available in 41 minutes and 14 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Pull request overview
This PR consolidates the theme resource copy/Sass compilation steps into the main build script and adds a post-build patch to the generated ESM bundle to work around a Rspack Module Federation interop issue involving dayjs resolution.
Changes:
- Remove the standalone
scripts/copy-resources.jsscript and its package.json script entries. - Rename/repurpose the build post-step to
afterBuild()insidescripts/build.js, keeping the theme copy + Sass compilation there. - Add a post-build string-rewrite “hack” that patches the generated
fesm2022/alauda-ui.mjsto make thedayjsimport tolerant of default-export interop.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/copy-resources.js | Removed; its responsibilities are now handled by the main build script. |
| scripts/build.js | Runs theme resource copying + Sass compilation after ng-packagr, and patches the generated ESM entry for dayjs interop. |
| package.json | Removes unused build scripts that referenced the deleted copy script. |
| .changeset/pink-houses-lose.md | Adds a patch changeset documenting the Rspack/dayjs workaround. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.