forked from ritz078/rollup-plugin-filesize
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Fix for __dirname? rollup/rollup#3445 2. Resume using `filesize` again in Rollup config; tests/add coverage? feat: replace `render` with `reporter` array BREAKING CHANGE: Removes `render`. Also adds sourcemaps and bumps some devDeps and drops unneeded ones
- Loading branch information
Showing
8 changed files
with
219 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,42 @@ | ||
import babel from "rollup-plugin-babel"; | ||
import filesize from "./src/index"; | ||
// import filesize from "./src/index.js"; | ||
import pkg from "./package.json"; | ||
|
||
export default { | ||
external: ["fs", "util", ...Object.keys(pkg.dependencies)], | ||
plugins: [ | ||
babel({ | ||
babelrc: false, | ||
plugins: ["transform-async-to-promises"], | ||
presets: ["@babel/preset-env"], | ||
}), | ||
filesize(), | ||
], | ||
input: "src/index.js", | ||
output: { | ||
file: "dist/index.js", | ||
format: "cjs", | ||
const reporters = ["boxen"]; | ||
|
||
export default [ | ||
{ | ||
external: ["fs", "util", ...Object.keys(pkg.dependencies)], | ||
plugins: [ | ||
babel({ | ||
babelrc: false, | ||
presets: [["@babel/preset-env", { targets: { node: 8 } }]], | ||
}), | ||
// filesize(), | ||
], | ||
input: "src/index.js", | ||
output: { | ||
sourcemap: true, | ||
file: `dist/index.js`, | ||
format: "cjs", | ||
}, | ||
}, | ||
}; | ||
...reporters.map((reporter) => { | ||
return { | ||
plugins: [ | ||
babel({ | ||
babelrc: false, | ||
presets: [["@babel/preset-env", { targets: { node: 8 } }]], | ||
}), | ||
// filesize(), | ||
], | ||
input: `src/reporters/${reporter}`, | ||
output: { | ||
exports: "named", | ||
sourcemap: true, | ||
file: `dist/reporters/${reporter}.js`, | ||
format: "cjs", | ||
}, | ||
}; | ||
}), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.