GithubHelp home page GithubHelp logo

Comments (4)

nabilfreeman avatar nabilfreeman commented on June 15, 2024 1

Thank you @crutchcorn !!! We are trying the new version as part of our pre xmas RN upgrade

from react-native-responsive-ui.

nabilfreeman avatar nabilfreeman commented on June 15, 2024

Agreed - also this results in a really annoying eslint error even if you have transpilation because package.json points to index.js rather than index.ts.

I fixed with patch-package:

To include package.json which is normally excluded I needed to run

npx patch-package --exclude 'nothing' react-native-responsive-ui

after making the edit.

diff --git a/node_modules/react-native-responsive-ui/package.json b/node_modules/react-native-responsive-ui/package.json
index 1de19ec..2e57720 100644
--- a/node_modules/react-native-responsive-ui/package.json
+++ b/node_modules/react-native-responsive-ui/package.json
@@ -55,7 +59,7 @@
   ],
   "homepage": "https://github.com/wcandillon/react-native-responsive-ui#readme",
   "license": "MIT",
-  "main": "dist/src/index.js",
+  "main": "src/index.ts",
   "name": "react-native-responsive-ui",
   "peerDependencies": {
     "react": ">=16.8.3",

from react-native-responsive-ui.

nabilfreeman avatar nabilfreeman commented on June 15, 2024

I'm back again! This now caused crashes in my react-native-web migration so I had to add support for Typescript to webpack. Looks like RN Metro Bundler supports TS out of the box.

from react-native-responsive-ui.

crutchcorn avatar crutchcorn commented on June 15, 2024

This issue should now be fixed in 2.1.2. Please mention if this issue persists in future projects

from react-native-responsive-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.