Read a package.json exports map: which conditions are reachable, which are shadowed, and what the legacy main, module and types fields still do.
Waiting for a package.json
Nothing is uploaded. Paste the file, or load an example.
Condition order is semantic: the first match wins. types must come first or TypeScript never reaches it and your package looks untyped, and nothing after default is reachable at all. Neither mistake fails at publish time — both fail for whoever installs it.
Paste a package.json to see what it actually does.
Targets are read as written, not resolved: this cannot tell you whether ./dist/index.js exists, whether it is really ESM, or whether the .d.ts matches the implementation. Those are the checks a publish-time tool such as publint or arethetypeswrong performs against the built package, and they are worth running as well. Condition support also varies by bundler, so a map that resolves correctly in Node can still be read differently elsewhere.
Package Entry Point Inspector runs entirely on your device — your package.json is parsed in your browser and nothing is resolved or uploaded
You’re on the Free plan. Compare plans
An exports map is the only part of a package.json whose order is semantic, and that single fact causes most of the trouble with it. Node and every bundler take the first matching condition, so types below import is never reached and the package appears to have no types at all. Anything after default is unreachable, because default always matches.
None of this fails at publish time. It fails for a consumer, days later, and the error they see — a missing type declaration, a CommonJS file loaded as ESM — points at their setup rather than at your map. So the unreachable conditions are what this leads with rather than a tree view.
Adding an exports map also seals the package: once present, nothing outside the map can be imported at all. Deep imports that consumers were relying on stop working, and that is a breaking change whatever the version number says.
Because resolution takes the first matching condition and TypeScript matches types. Placed below import or require, it is never reached, so consumers get no declarations — and nothing in your build or publish reports it.
An earlier sibling that always matches. default is the obvious one, and node above import and require wins for both in Node. The map is still valid JSON and still publishes.
Yes. Once a map exists, only the subpaths it lists can be imported. Anything consumers reached by file path stops working, which is a breaking change even though nothing in your own code changed.
Usually yes. Tools that do not read the exports map still use them, and the cost of keeping them consistent is low. They are ignored by anything that does honour the map.
No. Targets are read as written, so this cannot tell you whether ./dist/index.js exists or is really ESM. Those checks need the built package, which is what publint is for.
If a tool here saved you some time, you can put something towards the hosting.Buy me a coffee, on Ko-fi, opens in a new tab