diff --git a/.gitignore b/.gitignore index 2a5a3aaa8f..a098cfc435 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ es5/* .idea/ core.js +core.es.js # Ignore Chinese clones for now. lang/zh-Han*.json diff --git a/.npmignore b/.npmignore index 3f605a5676..90669108ee 100644 --- a/.npmignore +++ b/.npmignore @@ -5,3 +5,4 @@ dist/video-js-*.zip !es5/** !src/css/** !core.js +!core.es.js diff --git a/package.json b/package.json index 8a67bc15ad..011f969ddb 100644 --- a/package.json +++ b/package.json @@ -158,7 +158,8 @@ "sandbox", "test/dist", "test/api", - "core.js" + "core.js", + "core.es.js" ] }, "greenkeeper": { diff --git a/rollup.config.js b/rollup.config.js index 1aad417644..182d0aa5ec 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -186,16 +186,24 @@ export default cliargs => [ onwarn, watch }, - // core + // core cjs, es { input: 'src/js/video.js', - output: { - format: 'cjs', - file: 'core.js', - strict: false, - banner, - globals: globals.module - }, + output: [ + { + format: 'es', + file: 'core.es.js', + strict: false, + banner, + globals: globals.module + }, { + format: 'cjs', + file: 'core.js', + strict: false, + banner, + globals: globals.module + } + ], external: externals.module, plugins: [ json(),