Build a package using @pigment/css react and use rollup.
Current behavior
Without the vite sidestep. I get the following issues:
Uncaught SyntaxError: The requested module 'node_modules/prop-types/index.js' does not provide an export named 'default' (at elementAcceptingRef.js:1:8)
Uncaught SyntaxError: The requested module 'node_modules/react-is/index.js' does not provide an export named 'ForwardRef' (at getDisplayName.js:1:10)
Steps to reproduce
Build a package using @pigment/css react and use rollup.
Current behavior
Without the vite sidestep. I get the following issues:
relevant links: https://stackoverflow.com/a/44868718/439750 https://github.com/mui/material-ui/issues/18791 https://github.com/react-component/util/issues/105
Expected behavior
These issues should not exist.
Context
I'm using pigment-css as part of a custom UI library. With tsup this issue isn't present. However using rollup it is.
To sidestep the issue, I have added the following to my vite config:
Search keywords: vite build