Skip to content

Add main and module fields for resolvers without exports support - #125

Open
veksa wants to merge 2 commits into
stackblitz:masterfrom
veksa:fix/legacy-main-module-fields
Open

Add main and module fields for resolvers without exports support#125
veksa wants to merge 2 commits into
stackblitz:masterfrom
veksa:fix/legacy-main-module-fields

Conversation

@veksa

@veksa veksa commented Jul 30, 2026

Copy link
Copy Markdown

The package is exports-only, so resolvers that predate exports — webpack 4
(react-scripts 4) in particular — can't find it at all:
Cannot find module: 'alien-signals'.

This adds two fallback fields pointing at files that are already published:

"main": "./cjs/index.cjs",
"module": "./esm/index.mjs",

exports still wins everywhere it's understood, so nothing changes for Node,
webpack 5, Vite or Rollup — verified, along with build, tests and tsslint.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

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.

1 participant