Open Sourav12061999 opened 1 year ago
Hello, I believe the following should work:
babel-plugin-typescript-to-proptypes
babel.config.js
file, that contains the babel settings from the Readme.md file.package.json
process.env.BABEL_ENV
to "development" in scripts/build.js
, otherwise the proptypes are removed in prod modeimport React from "react";
to each component, even if it is not needed anymore when using the new JSX transform. Otherwise the proptypes won't be exported (see https://github.com/milesj/babel-plugin-typescript-to-proptypes/issues/64)npm run build
. Proptypes should still be in the compiled files in build/static/js/*.js
I want some help on how to set this up with the `create-react-app --template typescript, I am not sure I am doing something wrong or it's some issue from the package itself