mirror of
https://github.com/videojs/video.js.git
synced 2025-01-25 11:13:52 +02:00
chore(babel): Upgrade to Babel 7 (#5498)
Use npx babel-upgrade --write --install to initiate the upgrade. Then update grunt and rollup. Decreases minified, gzipped filesize by about 1KB. Decreases build times by a few minutes.
This commit is contained in:
parent
59adeb332f
commit
313036e132
9
.babelrc
9
.babelrc
@ -1,7 +1,10 @@
|
||||
{
|
||||
"presets": [
|
||||
["es2015", {
|
||||
"loose": true
|
||||
}]
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"loose": true
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
require('babel-register');
|
||||
require('@babel/register');
|
||||
|
||||
// Need to `require` a separate Grunt file so we can use ES6 syntax via
|
||||
// Babel's require hook.
|
||||
|
3352
package-lock.json
generated
3352
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@ -52,8 +52,8 @@
|
||||
"url": "https://github.com/videojs/video.js.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.0.0",
|
||||
"@videojs/http-streaming": "1.3.0",
|
||||
"babel-runtime": "^6.9.2",
|
||||
"global": "4.3.2",
|
||||
"safe-json-parse": "4.0.0",
|
||||
"tsml": "1.0.1",
|
||||
@ -62,14 +62,15 @@
|
||||
"xhr": "2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.0.0",
|
||||
"@babel/core": "^7.0.0",
|
||||
"@babel/node": "^7.0.0",
|
||||
"@babel/plugin-transform-runtime": "^7.0.0",
|
||||
"@babel/preset-env": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"aliasify": "^2.1.0",
|
||||
"autoprefixer": "^9.0.1",
|
||||
"babel-cli": "^6.11.4",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-runtime": "^6.9.0",
|
||||
"babel-preset-es2015": "^6.14.0",
|
||||
"babel-register": "^6.9.0",
|
||||
"babelify": "^8.0.0",
|
||||
"babelify": "^10.0.0",
|
||||
"bluebird": "^3.5.1",
|
||||
"browserify-derequire": "^0.9.4",
|
||||
"browserify-istanbul": "^2.0.0",
|
||||
@ -92,7 +93,7 @@
|
||||
"grunt-contrib-connect": "~2.0.0",
|
||||
"grunt-contrib-copy": "^1.0.0",
|
||||
"grunt-contrib-cssmin": "~3.0.0",
|
||||
"grunt-contrib-watch": "~1.1.0",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-coveralls": "^1.0.0",
|
||||
"grunt-karma": "^3.0.0",
|
||||
"grunt-sass": "^3.0.2",
|
||||
@ -137,7 +138,7 @@
|
||||
"replace": "^0.3.0",
|
||||
"rollup": "^0.66.2",
|
||||
"rollup-plugin-alias": "^1.4.0",
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"rollup-plugin-babel": "^4.0.1",
|
||||
"rollup-plugin-commonjs": "^9.1.0",
|
||||
"rollup-plugin-filesize": "^4.0.1",
|
||||
"rollup-plugin-ignore": "^1.0.3",
|
||||
|
@ -45,12 +45,11 @@ const primedBabel = babel({
|
||||
exclude: 'node_modules/**(!http-streaming)',
|
||||
compact: false,
|
||||
presets: [
|
||||
['es2015', {
|
||||
['@babel/preset-env', {
|
||||
loose: true,
|
||||
modules: false
|
||||
}]
|
||||
],
|
||||
plugins: ['external-helpers']
|
||||
]
|
||||
});
|
||||
|
||||
export default cliargs => [
|
||||
|
@ -40,7 +40,16 @@ module.exports = function(config) {
|
||||
browserify: {
|
||||
debug: true,
|
||||
plugin: ['proxyquireify/plugin'],
|
||||
transform: ['babelify']
|
||||
transform: [['babelify', {
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"loose": true
|
||||
}
|
||||
]
|
||||
]
|
||||
}]]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user