Skip to content

Commit ad9967f

Browse files
Raphaël DrozRaphaël Droz
andauthored
strip console.* in dist/flow.min.js (#312)
Co-authored-by: Raphaël Droz <raphael.droz+floss@gmail.com>
1 parent 7b79e4d commit ad9967f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"npm-check-updates": "^11.0.2",
6060
"rollup": "^2.37.1",
6161
"rollup-plugin-istanbul": "^3.0.0",
62+
"@rollup/plugin-strip": "^2.1.0",
6263
"rollup-plugin-terser": "^7.0.2",
6364
"sinon": "^9.2.3"
6465
},

rollup.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import istanbul from 'rollup-plugin-istanbul';
44
import pkg from './package.json';
55
import replace from '@rollup/plugin-replace';
66
import resolve from '@rollup/plugin-node-resolve';
7+
import strip from '@rollup/plugin-strip';
78
import { terser } from "rollup-plugin-terser";
89

910
let plugins = [
@@ -30,7 +31,7 @@ export default [
3031
},
3132
{
3233
input: 'src/Flow.js',
33-
plugins: plugins.concat([terser()]),
34+
plugins: plugins.concat([strip({functions:['console.(log|debug)','debug','alert']}), terser()]),
3435
output: {
3536
name: 'Flow',
3637
banner: `/*! ${pkg.name} ${pkg.version} */\n`,

0 commit comments

Comments
 (0)