Skip to content

fix: align package module entry with published ESM file#9

Merged
chenjiahan merged 2 commits into
rstackjs:mainfrom
jaasieldelgado131:fix-module-entry
Jun 12, 2026
Merged

fix: align package module entry with published ESM file#9
chenjiahan merged 2 commits into
rstackjs:mainfrom
jaasieldelgado131:fix-module-entry

Conversation

@jaasieldelgado131

Copy link
Copy Markdown
Contributor

Summary

  • update the package module field to point at ./dist/index.js, matching the ESM file produced in the published package and the existing exports["."].import target

Reproduction

The published rsbuild-plugin-unplugin-vue@0.2.0 package advertises module: "./dist/index.mjs", but the npm tarball contains dist/index.js, dist/index.cjs, and dist/index.d.ts; it does not contain dist/index.mjs.

npm view rsbuild-plugin-unplugin-vue@0.2.0 name version main module exports --json
npm pack rsbuild-plugin-unplugin-vue@0.2.0 --dry-run --json --ignore-scripts

Validation

  • package metadata assertion: module and exports["."].import both resolve to ./dist/index.js
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 244e3a61-8b15-4675-8a9a-e72e6c38f755

📥 Commits

Reviewing files that changed from the base of the PR and between 564e50c and a39c41a.

📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Walkthrough

This PR updates the package export mapping in package.json by changing the ESM entry point from ./dist/index.mjs to ./dist/index.js. This consolidates the module exports to use a single JavaScript file for the ES module export path rather than maintaining a separate .mjs file extension. The change affects how the package's ESM consumers will resolve the module.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: updating the package module entry to align with the actual published ESM file.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the problem (misaligned module entry), reproduction steps, and validation approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@chenjiahan chenjiahan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@chenjiahan chenjiahan merged commit 1eedfce into rstackjs:main Jun 12, 2026
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