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

Standalone player exports unsupported by IE11 #954

Closed
vai0 opened this issue Jul 2, 2020 · 1 comment
Closed

Standalone player exports unsupported by IE11 #954

vai0 opened this issue Jul 2, 2020 · 1 comment

Comments

@vai0
Copy link

vai0 commented Jul 2, 2020

Current Behavior

If exporting standalone player exports (youtube, wistia, Soundcloud, etc...) and not react-player, Internet Explorer 11 errors because it does not recognize es6 syntax in the imported files.

e.g.,

import WistiaPlayer from "react-player/wistia";

results in a console error SCRIPT1010 Expected Identifier, pointing to a non-transpiled version of react-player/wistia.js

const { createReactPlayer } = require('./lib/ReactPlayer') <<< errors on this line
const Player = require('./lib/players/Wistia').default                               
module.exports = createReactPlayer([Player])

Importing just react-player works just fine since its pointing to a fully transpiled version of the lib at lib/index.js. e.g.,

import ReactPlayer from "react-player";

However, ideally I'd like to not have to do this to reduce the bundle size.

Expected Behavior

Be able to pick and choose imports and have it supported by IE11.

@cookpete
Copy link
Owner

cookpete commented Jul 2, 2020

Is it just the fact that the first line uses destructuring?

Webmaster1116 added a commit to Webmaster1116/video-player that referenced this issue May 20, 2021
webmiraclepro added a commit to webmiraclepro/video-player that referenced this issue Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants