Skip to content

fix: hack for rspack module federation due to dayjs -> dayjs/esm alias#605

Merged
JounQin merged 3 commits into
masterfrom
hack/dayjs_esm
Jun 3, 2026
Merged

fix: hack for rspack module federation due to dayjs -> dayjs/esm alias#605
JounQin merged 3 commits into
masterfrom
hack/dayjs_esm

Conversation

@JounQin

@JounQin JounQin commented Jun 2, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 2, 2026 14:54
@changeset-bot

changeset-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e60c20d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@alauda/ui Patch

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

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@JounQin, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2df5ba52-09b5-43f7-9804-99e9ba606926

📥 Commits

Reviewing files that changed from the base of the PR and between 80f8418 and e60c20d.

📒 Files selected for processing (5)
  • .changeset/pink-houses-lose.md
  • package.json
  • scripts/build.js
  • scripts/copy-resources.js
  • scripts/publish-version.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hack/dayjs_esm

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.js script and its package.json script entries.
  • Rename/repurpose the build post-step to afterBuild() inside scripts/build.js, keeping the theme copy + Sass compilation there.
  • Add a post-build string-rewrite “hack” that patches the generated fesm2022/alauda-ui.mjs to make the dayjs import 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.

Comment thread scripts/build.js
@JounQin JounQin merged commit 28dcb7d into master Jun 3, 2026
7 checks passed
@JounQin JounQin deleted the hack/dayjs_esm branch June 3, 2026 06:55
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