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.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser