Repository navigation
build: align package.json exports with @ui5/webcomponents convention - #38
Merged
Merged
Conversation
petermuessig
approved these changes
Oct 27, 2026
adrian-bobev
approved these changes
Oct 27, 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.
Remove the default-entry fields (
main,module,types) and theexports["."]block that all pointed at a single component (dist/Geomap.js). This treated one component as the package's default export, which does not match how UI5 Web Components packages are structured deliberately expose no default entry and require consumers to import components via subpaths.Adopt the subpath-only exports shape:
./src/*raw TypeScript sources (useful inside monorepos)./dist/*compiled output (explicit, keeps the catch-allbelow from double-mapping)
./package.jsonfor tools that read the manifest at runtime./bundle.esm.jsexposes the existing root-level self-containedbundle to published consumers
./*→./dist/*catch-all so consumers can write@ui5/webcomponents-geomap/Geomap.jswithout the/dist/prefixAlso expand the
fileswhitelist to includesrc/andbundle.esm.jsso the new entries actually resolve in the published tarball.Note: the commit that introduced the removed fields (bcedc5e, "build: fix package.json for publish") claimed to "match @ui5/webcomponents convention" but did the opposite — the real convention is to have no default entry at all. This commit corrects that.
BREAKING CHANGE:
import "@ui5/webcomponents-geomap"(the bare package specifier) no longer resolves — it now throwsERR_PACKAGE_PATH_NOT_EXPORTED, matching every other@ui5/webcomponents-*package. Consumers must use subpath imports, e.g.import "@ui5/webcomponents-geomap/dist/Geomap.js"orimport "@ui5/webcomponents-geomap/Geomap.js". The README and docs already only use the subpath form.