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: use Rollup 2 #12010
chore: use Rollup 2 #12010
Changes from 3 commits
e1a8f21
9166700
02b71c2
22b8b6b
6d1f4af
4f1fabb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,13 @@ const filter = require("gulp-filter"); | |
const gulp = require("gulp"); | ||
const path = require("path"); | ||
const rollup = require("rollup"); | ||
const rollupBabel = require("rollup-plugin-babel"); | ||
const rollupBabel = require("@rollup/plugin-babel").default; | ||
const rollupBabelSource = require("./scripts/rollup-plugin-babel-source"); | ||
const rollupCommonJs = require("rollup-plugin-commonjs"); | ||
const rollupCommonJs = require("@rollup/plugin-commonjs"); | ||
const rollupJson = require("@rollup/plugin-json"); | ||
const rollupNodeBuiltins = require("rollup-plugin-node-builtins"); | ||
const rollupNodeGlobals = require("rollup-plugin-node-globals"); | ||
const rollupNodeResolve = require("rollup-plugin-node-resolve"); | ||
const rollupReplace = require("rollup-plugin-replace"); | ||
const rollupNodePolyfills = require("rollup-plugin-node-polyfills"); | ||
const rollupNodeResolve = require("@rollup/plugin-node-resolve").default; | ||
const rollupReplace = require("@rollup/plugin-replace"); | ||
const { terser: rollupTerser } = require("rollup-plugin-terser"); | ||
|
||
const defaultSourcesGlob = "./@(codemods|packages|eslint)/*/src/**/*.js"; | ||
|
@@ -135,6 +134,7 @@ function buildRollup(packages) { | |
rollupBabel({ | ||
envName: babelEnvName, | ||
babelrc: false, | ||
babelHelpers: "bundled", | ||
extends: "./babel.config.js", | ||
}), | ||
rollupNodeResolve({ | ||
|
@@ -153,17 +153,12 @@ function buildRollup(packages) { | |
// Rollup doesn't read export maps, so it loads the cjs fallback | ||
"packages/babel-compat-data/*.js", | ||
], | ||
namedExports: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
"babel-plugin-dynamic-import-node/utils.js": [ | ||
"createDynamicImportTransform", | ||
"getImportSource", | ||
], | ||
"@babel/standalone": ["availablePlugins", "registerPlugin"], | ||
}, | ||
}), | ||
rollupJson(), | ||
rollupNodeBuiltins(), | ||
rollupNodeGlobals({ sourceMap: sourcemap }), | ||
rollupNodePolyfills({ | ||
sourceMap: sourcemap, | ||
include: "**/*.js", | ||
}), | ||
], | ||
}) | ||
.then(bundle => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,11 @@ | |
"@babel/preset-flow": "^7.10.4", | ||
"@babel/register": "^7.10.5", | ||
"@babel/runtime": "^7.11.0", | ||
"@rollup/plugin-json": "4.0.1", | ||
"@rollup/plugin-babel": "^5.2.0", | ||
"@rollup/plugin-commonjs": "^13.0.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The latest |
||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^9.0.0", | ||
"@rollup/plugin-replace": "^2.3.3", | ||
"babel-jest": "^24.9.0", | ||
"babel-plugin-transform-charcodes": "^0.2.0", | ||
"chalk": "^2.4.2", | ||
|
@@ -55,13 +59,9 @@ | |
"prettier": "^2.0.5", | ||
"pump": "^3.0.0", | ||
"rimraf": "^2.6.3", | ||
"rollup": "1.27.9", | ||
"rollup": "^2.26.5", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-node-builtins": "^2.1.2", | ||
"rollup-plugin-node-globals": "^1.4.0", | ||
"rollup-plugin-node-resolve": "^5.0.0", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-node-polyfills": "^0.2.1", | ||
"rollup-plugin-terser": "^5.3.0", | ||
"test262-stream": "^1.3.0", | ||
"through2": "^2.0.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.
rollup-plugin-node-polyfills
replaces bothrollup-plugin-node-globals
androllup-plugin-node-builtins
. This has been done on v8 branch and now can be backported since we are not building on node.js 6.