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

Chore: introduces core ES module. #6287

Merged
merged 2 commits into from
Nov 15, 2019
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ es5/*
.idea/

core.js
core.es.js

# Ignore Chinese clones for now.
lang/zh-Han*.json
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ dist/video-js-*.zip
!es5/**
!src/css/**
!core.js
!core.es.js
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@
"sandbox",
"test/dist",
"test/api",
"core.js"
"core.js",
"core.es.js"
]
},
"greenkeeper": {
Expand Down
24 changes: 16 additions & 8 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
gjanblaszczyk marked this conversation as resolved.
Show resolved Hide resolved
strict: false,
banner,
globals: globals.module
}
],
external: externals.module,
plugins: [
json(),
Expand Down