-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
WebPack 5 and old chrome (webview 38) #954
Comments
Hey @oreons, The demos site (hodgef.com/simple-keyboard) is not compatible with older browsers, because it's meant for devs. However, the simple-keyboard library itself is compatible with older browsers. You can run the following demo in an old supported browser (such as Internet Explorer 11) to verify: Regards, |
Oh! Sorry - I did use const in that IE demo. Just changed it to Basically the main demos are all in es6+ so indeed if you're using them in your project you'll need to transpile to es5. The simple-keyboard package should be compatible with the old browsers in this list. I don't think that covers Chromium 38 though (if that's what you're targeting). Regards, |
Interesting... Thanks for the heads up! |
Hey @oreons, This issue should be fixed in the newly published simple-keyboard@3.0.19. I've also updated the Internet Explorer demo. Let me know if you're still having this issue! Regards, |
Thank you very much , now its works! |
Simple-keyboard version 3.0.0
Describe the bug
In webpack 5, to support older versions of browsers, necessary to include in webpack.config.js option:
target: ["es5"]
.Otherwise, webpack will use a new syntax in the final bundle (for example, the const keyword). Some older versions of chrome, such as 38, don't understand the new syntax and throw an error.
Unfortunately, these webview versions are still used in industrial devices running Android 4.1. When running program with keyboard module on such a device, the error "Uncaught SyntaxError: Use of const in strict mode."
You can read about it here: https://webpack.js.org/migrate/5/#need-to-support-an-older-browser-like-ie-11
If you need an old browser for the test, you can download it here: https://www.googleapis.com/download/storage/v1/b/chromium-browser-continuous/o/Win%2F288629%2Fchrome-win32.zip?generation=1407723831493000&alt=media
The text was updated successfully, but these errors were encountered: