segmentio / evergreen

🌲 Evergreen React UI Framework by Segment
https://evergreen.segment.com
MIT License
12.39k stars 832 forks source link

Production build is broken #807

Closed imgyf closed 4 years ago

imgyf commented 4 years ago

Hi team evergreen, my production build is showing this error in the console but the development build works fine in localhost.

error.png

Steps to reproduce the bug:

  1. Clone my repo here: https://github.com/gohyifan/openflow
  2. Run yarn install and yarn start
  3. See that it works fine in localhost.
  4. Visit production and see that it's broken.

Environment: OS: macOS Catalina 10.15 Browser: Chrome Evergreen version: 4.27.2 React boilerplate: create-react-app

mshwery commented 4 years ago

@gohyifan if you use v4.25.0 or earlier, does the same thing happen?

mshwery commented 4 years ago

I was able to pinpoint this to something between v4.25.0-v4.26.0-0 but it doesn't affect all production builds. For instance, we're using v4.27.2 in production and the optimized webpack build is fine.

mshwery commented 4 years ago

Resolved by https://github.com/segmentio/evergreen/pull/809

mshwery commented 4 years ago

I cloned your repo and upgraded to v4.27.3 and was able yarn build && serve -s build

imgyf commented 4 years ago

v4.27.3 worked, thanks @mshwery !