Make maintainable workarounds with codegen 💥
Read OriginalThe 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.
0 Comments
Comments
No comments yet
Be the first to share your thoughts!
Top of the Week
No top articles yet