Skip to content

fix(utils): align package.json entrypoints with rslib output#4436

Closed
bigslycat wants to merge 2 commits intomodule-federation:mainfrom
bigslycat:fix/utils-bundle-entrypoints
Closed

fix(utils): align package.json entrypoints with rslib output#4436
bigslycat wants to merge 2 commits intomodule-federation:mainfrom
bigslycat:fix/utils-bundle-entrypoints

Conversation

@bigslycat
Copy link
Copy Markdown
Contributor

@bigslycat bigslycat commented Feb 12, 2026

Description

This PR fixes broken entrypoints for @module-federation/utilities@3.1.84.

After the rslib bundleless migration (commit bd276ac / PR #4357), the build output moved to nested folders (dist/esm, dist/cjs, dist/types), but packages/utilities/package.json still referenced the old flat dist/index.* files, making the package non-resolvable for consumers.

What changed

Align packages/utilities/package.json entry fields with the current rslib output layout:

  • main: ./dist/cjs/index.js
  • module: ./dist/esm/index.mjs
  • types: ./dist/types/index.d.ts
  • exports["."] + typesVersions["*"]["."]: updated accordingly

How to verify

Minimal consumer repro (same as the linked issue):

npm i @module-federation/utilities@3.1.84
node -e "console.log(require.resolve('@module-federation/utilities'))"

Expected: resolves successfully (no "Cannot find module …/dist/index.*" errors).

Repo-side sanity check (optional):

pnpm -w nx run utils:build
# ensure dist/esm, dist/cjs, dist/types are produced and package entrypoints match

Related Issue

Fixes #4434.

Regression introduced by bd276ac / #4357.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes. (N/A — package.json entrypoints fix only)
  • All new and existing tests passed.
  • I have updated the documentation. (N/A)

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 12, 2026

⚠️ No Changeset found

Latest commit: 1cadc38

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 12, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 1cadc38
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/698fb75e1a3a75000836bc9a
😎 Deploy Preview https://deploy-preview-4436--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ScriptedAlchemy
Copy link
Copy Markdown
Member

@bigslycat please add changeset

@github-actions
Copy link
Copy Markdown
Contributor

Bundle Size Report

1 package(s) changed, 37 unchanged.

Package Total dist Delta ESM gzip Delta
utils 110.6 kB no change 328 B +328 B (+∞%)

Total dist: 6.66 MB (no change)
Total ESM gzip: 138.1 kB (+328 B (+0.2%))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: @module-federation/utilities entry points are broken in v3.1.84 after rslib migration

2 participants