-
Notifications
You must be signed in to change notification settings - Fork 716
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
SyntaxError in Internet Explorer 11 #904
Comments
I am also facing the same issue in IE11 and thanks for providing the temporary solution @jbanulso. |
Hi @jbanulso, thanks for opening this issue. Yes, that seems right. One idea would be to move d3-scale and @types/d3-scale to be Visx will not be shipping with transpiled node_modules. This is something folks can opt into as seen in the temp solution. We should add a note to docs/readme for visx/scale including the workaround for IE11 support. Happy to review a PR that includes this. cc @kristw and @williaster for additional thoughts and insights. |
@hshoff Not sure if this can be clubbed with this issue. Anyways just putting it out. I am also facing IE11 issues when using I am getting an error of |
@sarathps93 What approach did you take to solve this? |
The solution @jbanulso suggested worked for me. And in the above case regarding |
I had the same problem as @sarathps93 as part of a Next.js application. Adding When I switched to using |
Closing for now as there are solutions/workarounds detailed in this thread and IE11 was retired and out of support as of June 15, 2022. https://blogs.windows.com/windowsexperience/2022/06/15/internet-explorer-11-has-retired-and-is-officially-out-of-support-what-you-need-to-know/ |
🐛 Bug Report
Using
@visx/scale
in Internet Explorer throws a SyntaxError due to the use of non-transpiled ES6 syntax in the some of its D3 dependencies (i.e.d3-scale
andd3-array
). It is possible that this affects other packages in the@visx
monorepo.EDIT: Please note this was not a problem with the old
@vx/scale
.To Reproduce
Use the package in a IE11 context.
Expected behavior
I know there is debate on whether dependencies should be shipped already transpiled or not, but in general package maintainers ship different versions to accommodate different build targets.
Temporary solution
For those facing the same issue, I modified my Webpack config and made
babel-loader
"un-ignore" the affected code like this. Although not ideal, it does the trick:The text was updated successfully, but these errors were encountered: