Create React App Doesn't Strip Flow Types Inside Node_modules Directory
I've created new React app using create-react-app@1.4.3. And my app depends on NPM module which contains several Flow typed JSX files (retail-ui). App.js of my React app: import Re
Solution 1:
I looked into retail-ui package.json and they don't seem to have installed any babel plugin to remove flow types. So install babel plugin into that particular module to fix it.
npm install --save-dev babel-plugin-transform-flow-strip-types
Create .babelrc file with this content in the most parent directory
{
plugins: ["transform-flow-strip-types"]
}
this should remove flow types at runtime
Post a Comment for "Create React App Doesn't Strip Flow Types Inside Node_modules Directory"