Repository navigation
fix: point package.json entry fields at the ESM-only build - #1847
Merged
Merged
Conversation
Fixes oruga-ui#1846 PR oruga-ui#1597 dropped the CJS/UMD build, but main, unpkg, jsdelivr, and exports.require still pointed at the removed dist/index.umd.cjs file. Point those fields at dist/index.js and replace the stale require condition with default so Node's require(esm) resolves correctly.
👷 Deploy request for oruga-documentation-preview pending review.Visit the deploys page to approve it
|
mlmoravek
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1846
Proposed Changes
packages/oruga/package.jsonandpackages/examples/package.jsonsomain,unpkg, andjsdelivrpoint to the ESM build at./dist/index.jsinstead of the removed./dist/index.umd.cjs.exports["."].requireentry with"default": "./dist/index.js", sorequire()on modern Node (require(esm)) resolves to the ESM build instead of a missing file.Verification
npm run build:libandnpm run build:exampleson Node v26.3.1,dist/containsindex.js,index.js.map, andtypes/(examples alsoindex.css). There is noindex.umd.cjs.npm pack --dry-run: every referenced entry file is in the tarball.npx publint: All good! for both@oruga-ui/oruga-nextand@oruga-ui/examples.npx @arethetypeswrong/cli --pack: reports the expected "CJS resolves to ESM" warning for an ESM-only package. Other attw findings on./volarand./globalscome from those type-only export maps, which this PR does not change.import('@oruga-ui/oruga-next')works (136 exports, includingcreateOruga).require('@oruga-ui/oruga-next')works on Node 26.require.resolve('@oruga-ui/oruga-next')now returnsdist/index.js.