Skip to content
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 #3110

Closed
wants to merge 1 commit into from

Conversation

yuezk
Copy link

@yuezk yuezk commented Jun 21, 2019

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 #2978

@nolimits4web
Copy link
Owner

No, sorry, it will break many things. Enable transpiling or import UMD module directly

@lock lock bot added the outdated label May 20, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants