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

Closed
wants to merge 1 commit into from

Commits on Jun 21, 2019

  1. Add "browser" field to the package.json

    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.
    yuezk committed Jun 21, 2019
    Configuration menu
    Copy the full SHA
    b5b161c View commit details
    Browse the repository at this point in the history