mirror of
https://github.com/videojs/video.js.git
synced 2024-11-21 17:46:35 +02:00
feat: add core ES module. (#6287)
Allows you to do `import videojs from 'video.js/core.es.js';` to go along with `require('video.js/core.js')`;
This commit is contained in:
parent
f7b3772e27
commit
4f8c4988d2
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,6 +34,7 @@ es5/*
|
||||
.idea/
|
||||
|
||||
core.js
|
||||
core.es.js
|
||||
|
||||
# Ignore Chinese clones for now.
|
||||
lang/zh-Han*.json
|
||||
|
@ -5,3 +5,4 @@ dist/video-js-*.zip
|
||||
!es5/**
|
||||
!src/css/**
|
||||
!core.js
|
||||
!core.es.js
|
||||
|
@ -158,7 +158,8 @@
|
||||
"sandbox",
|
||||
"test/dist",
|
||||
"test/api",
|
||||
"core.js"
|
||||
"core.js",
|
||||
"core.es.js"
|
||||
]
|
||||
},
|
||||
"greenkeeper": {
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user