-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add "browser" field to the package.json #26
Conversation
When bundling the Swiper module using Webpack, the bundled js will cause a Syntax error in IE 11. The reason is that Webpack will use the "module" field (since the default value of mainFields defined in Webpack is ["browser", "module", "main"] ) as the entry point of Swiper. As the class syntax inside the "module" entry point was not transpiled and then was bundled into the target js files, which will cause the Syntax error in IE 11, because IE 11 doesn't support the class syntax.
I found the same issue too and can see the whole Dom7 class in IE 11 which is 100% breaking. |
I have the same issue. |
@nolimits4web After forking both the "Swiper" and the "Dom7" and referencing them in my Angular project, instead of these libraries via npm, I can confirm that this fix is the one that is avoiding the If you are not merging this PR, we will keep our own repositories with the fix as reference in our |
Another PR I made for Swiper is nolimits4web/swiper#3110, but it was closed. I think this PR won’t break any thing, because this only affect which js file is bundled, and the file used by the |
Any update about this @nolimits4web ? As I understand you may consider IE11 as an old browser and may not support it, this is just a little change that is making it works correctly also in this browser. |
Zero response. Absurd. |
Closing as Dom7 does not mean to support IE 11 |
When bundling the Swiper module using Webpack, the bundled js will cause a Syntax error in IE 11.
The reason is that Webpack will use the "module" field (since the default value of mainFields defined in Webpack is ["browser", "module", "main"] ) as the entry point of Swiper.
As the class syntax inside the "module" entry point was not transpiled and then was bundled into the target js files, which will cause the Syntax error in IE 11, because IE 11 doesn't support the class syntax.
The relevant issue is #21