Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6214

How to use patch-package to patch TSX files

$
0
0

Problem

I'm trying to use patch-package to patch a react-native package react-native-tab-view, however when I edit the TSX files included in the node_module for react-native-tab-view and apply my patch, the changes are not reflected in my app.

Structure of node_modules/react-native-tab-view

Below is a screenshot of the package structure.Package Structure

They also uses @react-native-community/bob to build the package prior to publishing so it generates a lib folder with a module folder and commonjs folder containing JS files.

My current stats

My patch is being created, however the files in /lib/module don't change and the changes are also not reflected in my app when running on the simulator

I'm trying to apply a patch using patch-package after editing the TSX files in /src as opposed to the JS files in module /lib/module as it is much simpler to implement.

Environmentreact-native 0.63.0patch-package 6.2.0react-native-tab-view 2.15.1react-native-gesture-handler 1.5.6react-native-reanimated 1.7.0

QuestionAm I missing a build or compile step to get react-native-tab-view to generate new JS files from the TSX files I created my patch for?

Any help would be greatly appreciated!


Viewing all articles
Browse latest Browse all 6214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>