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
Error with IE11 - SCRIPT1002: Syntax error - class FocusTrap #97
Comments
Hey @isaac-ipl, thanks for reporting this. The production bundle is built with rollup.js, so it handles the modules syntax itself, where as Babel handles the modules in the development builds. That is why you are seeing the difference in behaviour in the two builds (thank you for investigating further - that is very helpful information). Are you consuming |
Hi @greena13 thanks for the prompt reply, that's good info to know. I am using the CommonJs module (installed via npm). |
Ok, so I think the issue at the moment is that for some reason your Webpack configuration is using the ES6 module instead of the CommonJS modules in development. The way the package is intended to be consumed is the It's very possible I have misunderstood the standard or Webpack's behaviour somewhere along the line, and what I think is happening, is not. I unfortunately have to head into the office now, but where I will start my investigation when I get time (and you can to if you want to progress this further in the meantime) will be to examine the webpack development configuration for |
Just an update: reading through this long discussion I think I may have misunderstood the role of the I'll re-read tomorrow to check my interpretation and hopefully have a fix in the next few days. |
@isaac-ipl, I think I've fixed it. Could you please try version 1.1.3? |
Hi,
I am using react-hotkeys v1.1.1 in my create-react-app and when trying to load in IE11 an error (SCRIPT1002: Syntax error) is thrown in bundle.js on this line:
class FocusTrap extends __WEBPACK_IMPORTED_MODULE_1_react__["Component"] {
This is only when loading in development mode, it doesn't appear to be an issue with the production optimised build.
Is there any way to resolve this issue? (Apologies if this is a trivial fix, I'm quite new to the JS/React scene)
Thanks.
The text was updated successfully, but these errors were encountered: