theKashey / react-focus-on

🎯 Solution for WAI ARIA compatible modal dialogs or full-screen tasks, you were looking for
MIT License
336 stars 14 forks source link

Error in production after upgrading to v3.0.1 #9

Closed makarov906 closed 5 years ago

makarov906 commented 5 years ago

After upgrading i get the following error in production mode

Error: Sidecar medium not found
theKashey commented 5 years ago

:( yesterday was a quite strange day.

theKashey commented 5 years ago

Trying to reproduce the issue, and can't do it - https://codesandbox.io/s/react-focus-on-v3-jn3p7 (also tried with prod modes on localhost)

andrew--r commented 5 years ago

Error is reproducible only after production webpack build (dev mode is ok) and when using full import (import {FocusOn} from 'react-focus-on';)

theKashey commented 5 years ago

I was not able to break it from inside focus-on, but when I used it as a package at third party side - 🔥 Now I could fix it!

theKashey commented 5 years ago

The problem was with tree shaking of react-remove-scroll, which was caused by a bug in webpack (yet to report).

I've update sideEffects for said package to include sidecar, and that's fixed the problem.

Should be ok now :)

makarov906 commented 5 years ago

Thank you for a quick fix :)

theKashey commented 5 years ago

Thank you for beta testing :)