-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Use Rollup #4301
Use Rollup #4301
Conversation
Here's the assets output: ┌───────────────────────────────┬───────────┬───────────┐
│ filename │ size │ gzipped │
├───────────────────────────────┼───────────┼───────────┤
│ alt/video-js-cdn.css │ 53.12 KB │ 13.99 KB │
├───────────────────────────────┼───────────┼───────────┤
│ alt/video-js-cdn.min.css │ 45.6 KB │ 13.69 KB │
├───────────────────────────────┼───────────┼───────────┤
│ alt/video.novtt.js │ 796.66 KB │ 151.63 KB │
├───────────────────────────────┼───────────┼───────────┤
│ alt/video.novtt.min.js │ 226.18 KB │ 47.63 KB │
├───────────────────────────────┼───────────┼───────────┤
│ alt/video.novtt.rollup.cjs.js │ 604.6 KB │ 134.85 KB │
├───────────────────────────────┼───────────┼───────────┤
│ alt/video.novtt.rollup.es.js │ 604.58 KB │ 134.84 KB │
├───────────────────────────────┼───────────┼───────────┤
│ alt/video.novtt.rollup.js │ 604.83 KB │ 134.93 KB │
├───────────────────────────────┼───────────┼───────────┤
│ alt/video.novtt.rollup.min.js │ 156.56 KB │ 40.42 KB │
├───────────────────────────────┼───────────┼───────────┤
│ video-js.css │ 53.31 KB │ 14 KB │
├───────────────────────────────┼───────────┼───────────┤
│ video-js.min.css │ 45.74 KB │ 13.69 KB │
├───────────────────────────────┼───────────┼───────────┤
│ video-js.swf │ 16.72 KB │ 16.74 KB │
├───────────────────────────────┼───────────┼───────────┤
│ video.js │ 853.01 KB │ 165.83 KB │
├───────────────────────────────┼───────────┼───────────┤
│ video.min.js │ 245.82 KB │ 53.97 KB │
├───────────────────────────────┼───────────┼───────────┤
│ video.rollup.cjs.js │ 732.1 KB │ 154.19 KB │
├───────────────────────────────┼───────────┼───────────┤
│ video.rollup.es.js │ 732.08 KB │ 154.18 KB │
├───────────────────────────────┼───────────┼───────────┤
│ video.rollup.js │ 732.33 KB │ 154.26 KB │
├───────────────────────────────┼───────────┼───────────┤
│ video.rollup.min.js │ 213.41 KB │ 49.48 KB │
└───────────────────────────────┴───────────┴───────────┘ all the files that rollup currently generates have rollup in the name and generally correspond to the same files that don't have rollup. One thing I just realized is that the cjs builds shouldn't be running with node-resolve and commonjs plugins so bundlers will pick those up. The ES one should potentially do that as well. |
Will require this change in vttjs: videojs/vtt.js#14 |
build/rollup.js
Outdated
|
||
minifiedUmd.options.plugins.splice(4, 0, uglify({ | ||
preserveComments: 'some', | ||
srewIE8: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appears to be a typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup.
@@ -128,13 +150,14 @@ | |||
"videojs-doc-generator": "0.0.1", | |||
"videojs-flash": "^1.1.0", | |||
"videojs-standard": "^6.0.1", | |||
"webpack": "^2.3.0" | |||
"webpack": "^1.15.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webpack 2 doesn't support IE8: webpack/webpack#3070
I believe this is good to go now. One way to test and verify this is to clone this branch, npm install and run |
Updated and needs a re-review and test
The current output of the assets script:
|
Here's a merged table:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Works fine. I had one tiny comment/suggestion. Do with it what you will.
build/rollup.js
Outdated
} | ||
if (warning.code === 'UNRESOLVED_IMPORT') { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe these two blocks should be combined.
Based partially on https://github.com/videojs/video.js/compare/master...Rich-Harris:rollup?expand=1
Currently, exports UMD, minified UMD, CJS, and ES rolluped files as well as equivalent formats for the novtt file.
Still needs to be updated to work with the tests, which could be an issue, potentially, because of proxyquireify. Maybe tests will stay as they are.
The build is currently failing because the only babelrc is told to not compile module syntax and that is causing grunt and things to fail.