Skip to content

perf: import module replacements util directly#2959

Open
TheAlexLichter wants to merge 1 commit into
mainfrom
perf/module-replacements-util-import
Open

perf: import module replacements util directly#2959
TheAlexLichter wants to merge 1 commit into
mainfrom
perf/module-replacements-util-import

Conversation

@TheAlexLichter

@TheAlexLichter TheAlexLichter commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

📚 Description

We don't use the module replacements manifest, only the util.
As @gameroman pointed out in e18e/module-replacements#751, we can already use the dist alias to avoid pulling in the manifest and saving 21 kB.

This PR does exactly that.

Note: If e18e/module-replacements#751 lands I suggest to use the "official alias".

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jun 24, 2026 10:05pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Jun 24, 2026 10:05pm
npmx-lunaria Ignored Ignored Jun 24, 2026 10:05pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Two Vue components now import resolveDocUrl from module-replacements/dist/util.js instead of the package root. No other component behaviour changes.

Changes

ResolveDocUrl import path update

Layer / File(s) Summary
Import path update
app/components/Compare/ReplacementSuggestion.vue, app/components/Package/Replacement.vue
Both components update the resolveDocUrl import source from module-replacements to module-replacements/dist/util.js.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: importing the module replacements util directly for performance.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description matches the change: both components switch resolveDocUrl to the util dist import to avoid the manifest.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/module-replacements-util-import

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.

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

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