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

Remove custom UMD #3826

Merged
merged 2 commits into from
Jan 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions src/js/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
* @file video.js
* @module videojs
*/

/* global define */

import window from 'global/window';
import document from 'global/document';
import * as setup from './setup';
Expand Down Expand Up @@ -629,19 +626,6 @@ videojs.insertContent = Dom.insertContent;
*/
videojs.computedStyle = computedStyle;

/*
* Custom Universal Module Definition (UMD)
*
* Video.js will never be a non-browser lib so we can simplify UMD a bunch and
* still support requirejs and browserify. This also needs to be closure
* compiler compatible, so string keys are used.
*/
if (typeof define === 'function' && define.amd) {
define('videojs', [], () => videojs);

// checking that module is an object too because of umdjs/umd#35
} else if (typeof exports === 'object' && typeof module === 'object') {
module.exports = videojs;
}

export default videojs;
// We use Node-style module.exports here instead of ES6 because it is more
// compatible with different module systems.
module.exports = videojs;