今日已更新 166 条资讯 | 累计 20138 条内容
关于我们

Fix: babel-plugin-transform-flow-strip-types broken in Babel 7 and 8

takundanashebmuchena-pixel 2026年06月07日 23:24 4 次阅读 来源:Dev.to

The original babel-plugin-transform-flow-strip-types hasn't been updated in 9 years and breaks silently in Babel 7 and 8 environments. The fix I published a maintained fork that works as a drop-in replacement: npm install --save-dev babel-plugin-transform-flow-strip-types-maintained Then update your .babelrc: { "plugins": ["transform-flow-strip-types-maintained"] } That's it. No other changes needed. What's fixed Babel 7 and 8 peer dependency conflicts Missing syntax plugin declaration Deprecated visitor patterns allowDeclareFields support Automated migration If you want to update your entire project automatically: npx flow-strip-migrate . This updates your package.json and babel config in one command. More info: https://flowstrip.netlify.app npm: https://www.npmjs.com/package/babel-plugin-transform-flow-strip-types-maintained

本文内容来源于互联网,版权归原作者所有
查看原文