Proxy not defined errors in IE11
- Dominant language
- JavaScript
- Stars
- 193
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
We leverage storybook, webdriver, and saucelabs to do visual regression testing. Recently, probably on a bump of theme-context or dependent components, we started getting errors when we run IE tests that have @hig/button@1.3.2 rendered.
The error is: `Proxy is undefined`
It looks like the Proxy feature is leveraged here: https://github.com/Autodesk/hig/blob/development/packages/theme-context/src/ThemeContext/createThemeProxy.js#L12
Unfortunately they're not supported in IE11:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy#Browser_compatibility
I'll try some runs with `NODE_ENV === 'production'` [from here](https://github.com/Autodesk/hig/blob/development/packages/theme-context/src/ThemeContext/Consumer.js#L17)
But this could put other things into production mode (build tools) that aren't necessary, slowing down our tests. If the above works, can we consider leveraging a different environment variable (e.g. `HIG_ENV`)?
Contributor guide
Research direction
Start with packages/theme-context/src/ThemeContext/createThemeProxy.js and packages/theme-context/src/ThemeContext/Consumer.js, then reproduce the IE11 visual regression run with @hig/button@1.3.2. Check whether production mode avoids the Proxy error and whether a separate environment variable can do so without changing unrelated build behavior; done means the IE tests pass without unintended production-mode effects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100