ThemeContext.Extend causing issue in production build with rollup and treeshake enabled #6602
Labels
bug
issue that does not match design or documentation and requires code changes to address
Projects
Expected Behavior
I want to be able to use
ThemeContext module
into my React application based on Grommet then build it with vite/rollup for production with treeshaking enabled.Actual Behavior
Currently, if I used
<ThemeContext.Extend />
into my application then I build it for production with vite/rollup, I get the following error :Identified workarounds
sideEffects
property into grommetpackage.json
file fix the issue 🤔URL, screen shot, or Codepen exhibiting the issue
A repository has been bootstrapped to reproduce the error
A related closed issue ThemeContext.Extend causing issues from CRA production build, possibly missing 💥 #2669
Steps to Reproduce
npx create-vite
)npm install grommet styled-components
)ThemeContext
module in yourmain
module<App />
within<ThemeContext.Extend>
npm run build
npm run preview
Your Environment
The text was updated successfully, but these errors were encountered: