Skip to content

Commit

Permalink
fix: Added babel to build for ES2015, so older browsers are supported (
Browse files Browse the repository at this point in the history
  • Loading branch information
mimse authored and shawnbuso committed Jan 3, 2018
1 parent c0c4bee commit 9b25179
Show file tree
Hide file tree
Showing 5 changed files with 2,900 additions and 1,145 deletions.
13 changes: 13 additions & 0 deletions .babelrc
@@ -0,0 +1,13 @@
{
"presets": [
[
"env",
{
"targets": {
"ie": 11
},
"modules": false
}
]
]
}
16 changes: 10 additions & 6 deletions configs/rollup.config.js
@@ -1,21 +1,25 @@
import copy from 'rollup-plugin-copy';
import json from 'rollup-plugin-json'
import json from 'rollup-plugin-json';
import babel from 'rollup-plugin-babel';

export default {
name: 'videojsIma',
input: 'src/ima-plugin.js',
output: {
file: 'dist/videojs.ima.js',
format: 'umd'
format: 'umd',
},
external: ['video.js', 'videojs-contrib-ads'],
globals: {
'video.js': 'videojs'
'video.js': 'videojs',
},
plugins: [
json(),
copy({
"src/css/videojs.ima.css": "dist/videojs.ima.css",
})
]
'src/css/videojs.ima.css': 'dist/videojs.ima.css',
}),
babel({
exclude: 'node_modules/**',
}),
],
};
18 changes: 11 additions & 7 deletions configs/rollup.config.min.js
@@ -1,24 +1,28 @@
import copy from 'rollup-plugin-copy';
import json from 'rollup-plugin-json'
import { minify } from 'uglify-es';
import json from 'rollup-plugin-json';
import {minify} from 'uglify-es';
import uglify from 'rollup-plugin-uglify';
import babel from 'rollup-plugin-babel';

export default {
name: 'videojsIma',
input: 'src/ima-plugin.js',
output: {
file: 'dist/videojs.ima.min.js',
format: 'umd'
format: 'umd',
},
external: ['video.js', 'videojs-contrib-ads'],
globals: {
'video.js': 'videojs'
'video.js': 'videojs',
},
plugins: [
json(),
babel({
exclude: 'node_modules/**',
}),
uglify({}, minify),
copy({
"src/css/videojs.ima.css": "dist/videojs.ima.css",
})
]
'src/css/videojs.ima.css': 'dist/videojs.ima.css',
}),
],
};

0 comments on commit 9b25179

Please sign in to comment.