Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production build is broken #157

Closed
jbpenrath opened this issue Jan 26, 2023 · 0 comments
Closed

Production build is broken #157

jbpenrath opened this issue Jan 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@jbpenrath
Copy link
Member

jbpenrath commented Jan 26, 2023

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 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 (grommet/grommet#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

  1. yarn build
  2. Go to magnify-site package directory
  3. yarn preview
  4. Go to http://localhost:4173
  5. Display a view using the Toggle Component
  6. 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...

Additional context/Screenshots

@jbpenrath jbpenrath added the bug Something isn't working label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants