Kent C. Dodds 10/1/2017

Make maintainable workarounds with codegen 💥

Read Original

The article details a specific problem where the glamorous library's UMD build fails with React 16 due to a Rollup bundling issue with a `require` statement. It explains how the author used `codegen.macro`, a Babel plugin, to implement a conditional, build-time workaround that fetches PropTypes from the global object only for the UMD build, leaving other builds unchanged.

Make maintainable workarounds with codegen 💥

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet