Problematic behavior
The production build is currently broken until we disable rollup treeshaking (#156).
The <ThemeContext.Extend /> module is implied within the error. This module override globally the ThemeContext provided by styled-components so this is a side effects. It seems rollup removes this module from the bundle during tree shaking... Grommet had previously a similar issue with Webpack (https://github.com/grommet/grommet/issues/2669) but seems to fix that by adding a sideEffects attribute within its package.json. Right now, it seems that is this specific attribute that generate bundle error with rollup... (If we remove this attribute, all is working well...).
Expected behavior/code
The production build should work with rollup treeshaking enable.
Steps to Reproduce
yarn build
Go to magnify-site package directory
yarn preview
Go to http://localhost:4173
Display a view using the Toggle Component
Then boom... 💥
Environment
Jitsi magnify version: 0.1.0
Platform: Mac OS 13.1 – Brave 1.47.171
Possible Solution
Disable rollup treeshaking that is weird as it increases bundle size...
Bug Report
Problematic behavior The production build is currently broken until we disable rollup treeshaking (#156).
The
<ThemeContext.Extend />
module is implied within the error. This module override globally theThemeContext
provided bystyled-components
so this is a side effects. It seems rollup removes this module from the bundle during tree shaking... Grommet had previously a similar issue with Webpack (https://github.com/grommet/grommet/issues/2669) but seems to fix that by adding asideEffects
attribute within itspackage.json
. Right now, it seems that is this specific attribute that generate bundle error with rollup... (If we remove this attribute, all is working well...).Expected behavior/code The production build should work with rollup treeshaking enable.
Steps to Reproduce
yarn build
magnify-site
package directoryyarn preview
http://localhost:4173
Toggle
ComponentEnvironment
Possible Solution
Additional context/Screenshots