Skip to content

Commit

Permalink
Update rollup plugins (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
somewhatabstract committed Jun 17, 2020
1 parent b4d23d2 commit 3019468
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 274 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@
"@babel/preset-env": "^7.8.4",
"@babel/preset-flow": "^7.8.3",
"@babel/register": "^7.8.3",
"@rollup/plugin-babel": "^5.0.3",
"@rollup/plugin-commonjs": "^13.0.0",
"@rollup/plugin-json": "^4.0.3",
"@rollup/plugin-node-resolve": "^8.0.1",
"adler-32": "^1.2.0",
"ancesdir": "^2.0.0",
"babel-eslint": "^10.0.3",
Expand All @@ -60,10 +63,7 @@
"pretty-quick": "^2.0.0",
"rollup": "^2.0.6",
"rollup-plugin-analyzer": "^3.1.2",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-babel-minify": "^10.0.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-visualizer": "^4.0.1"
},
"resolutions": {
Expand Down
15 changes: 8 additions & 7 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import resolve from "rollup-plugin-node-resolve";
import babel from "rollup-plugin-babel";
import commonjs from "rollup-plugin-commonjs";
import minify from "rollup-plugin-babel-minify";
import babel from "@rollup/plugin-babel";
import commonjs from "@rollup/plugin-commonjs";
import json from "@rollup/plugin-json";
import resolve from "@rollup/plugin-node-resolve";

import analyzer from "rollup-plugin-analyzer";
import {terser} from "rollup-plugin-terser";
import visualizer from "rollup-plugin-visualizer";
import json from "@rollup/plugin-json";

const getOptionalPlugins = () => {
if (process.env.NODE_ENV === "CI") {
Expand Down Expand Up @@ -34,13 +35,13 @@ export default {
json(),
resolve({preferBuiltins: true}),
babel({
babelHelpers: "bundled",
exclude: "node_modules/**", // only transpile our source code
}),
commonjs({
sourceMap: false,
namedExports: {"promise.prototype.finally": ["shim"]},
}),
minify({comments: false, sourceMap: false, mangle: false}),
terser(),
...getOptionalPlugins(),
],
};
Loading

0 comments on commit 3019468

Please sign in to comment.