You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I'm creating a
react-nativelibrary using tsdx and I have the following problem:My dist imports
import 'react-dom';at the top of the file even though it's not a dependency anywhere. I can't figure out how to remove it.When executing
yarn analyzeI even get an error saying thatreact-domcan' be resolved.My package.json looks like this:
{ "version": "0.1.0", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts", "files": [ "dist", "src" ], "engines": { "node": ">=10" }, "scripts": { "start": "tsdx watch", "build": "tsdx build", "test": "tsdx test", "lint": "tsdx lint", "prepare": "tsdx build", "size": "size-limit", "analyze": "size-limit --why" }, "peerDependencies": { "react": ">=16", "react-native": "^0.63.4" }, "prettier": { "printWidth": 80, "semi": true, "singleQuote": true, "trailingComma": "es5" }, "name": "---", "author": "---", "module": "dist/lib.esm.js", "husky": { "hooks": { "pre-commit": "tsdx lint --fix" } }, "size-limit": [ { "path": "dist/lib.cjs.production.min.js", "limit": "50 KB" }, { "path": "dist/lib.esm.js", "limit": "50 KB" } ], "devDependencies": { "@babel/core": "^7.13.1", "@size-limit/preset-small-lib": "^4.9.2", "@testing-library/react-hooks": "^5.1.0", "@types/react": "^17.0.2", "@types/react-is": "^17.0.0", "@types/react-native": "^0.63.50", "@types/react-reconciler": "^0.26.0", "@types/react-test-renderer": "^17.0.1", "eslint-plugin-import": "^2.22.1", "eslint-plugin-simple-import-sort": "^7.0.0", "husky": "4", "react": "^17.0.1", "react-native": "^0.64.0", "rollup-plugin-internal": "^1.0.4", "size-limit": "^4.9.2", "ts-jest": "^26.5.2", "tsdx": "^0.14.1", "tslib": "^2.1.0", "typescript": "^4.2.2" }, "dependencies": { "react-is": "^17.0.1", "react-query": "^3.12.0", "react-reconciler": "^0.26.1", "superjson": "^1.7.2" }, "jest": { "preset": "react-native", "transformIgnorePatterns": [ "node_modules/(?!(jest-)?react-native|react-(native|universal|navigation)-(.*)|@react-native-community/(.*)|@react-navigation/(.*)|bs-platform|(@[a-zA-Z]+/)?(bs|reason|rescript)-(.*)+)" ], "transform": { "^.+\\.(t)sx?$": "ts-jest", "^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js" }, "setupFilesAfterEnv": [ "<rootDir>/src/setupTests.js" ] } }Thanks so much for the help in advance!
I've been stuck on this issue for hours.
Beta Was this translation helpful? Give feedback.
All reactions