mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
2921c2adac
Using ES6’s System.import allows webpack to split up the dependency into its own chunk and load it as necessary. When this is not possible (ie. when a script expects itself to be dropped into the html), follow the previous strategy of copying the dependency folder into the build folder.
19 lines
480 B
JavaScript
19 lines
480 B
JavaScript
import AppConstants from '../../constants/application_constants';
|
|
|
|
import { InjectInHeadUtils } from '../../utils/inject_utils';
|
|
|
|
|
|
/**
|
|
* Imports videojs and its stylesheet.
|
|
*
|
|
* @return {Promise} Promise that resolves with [video.js, video-js.css] on success.
|
|
*/
|
|
function importLib() {
|
|
return Promise.all([
|
|
InjectInHeadUtils.inject(AppConstants.videojs.cssUrl),
|
|
InjectInHeadUtils.inject(AppConstants.videojs.sdkUrl)
|
|
]);
|
|
}
|
|
|
|
export default { importLib };
|