Skip to content
Discussion options

You must be logged in to vote

thanks a ton @dai-shi. You are right, their package.json config was incorrect.
i removed the react-native line and changed the exports to this and now it works. Will patch the lib for now and make a PR for immer

	"exports": {
		"./package.json": "./package.json",
		".": {
			"react-native": {
				"types": "./dist/immer.d.ts",
				"default": "./dist/immer.legacy-esm.js"
			},
			"import": {
				"types": "./dist/immer.d.ts",
				"default": "./dist/immer.mjs"
			},
			"require": {
				"types": "./dist/immer.d.ts",
				"default": "./dist/cjs/index.js"
			}
		}
	},

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@gabimoncha
Comment options

@dai-shi
Comment options

@gabimoncha
Comment options

Answer selected by gabimoncha
@gabimoncha
Comment options

@dbritto-dev
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Please someone help on this
4 participants
Converted from issue

This discussion was converted from issue #3210 on August 13, 2025 23:57.