Skip to content

Commit

Permalink
Merge pull request #366 from apiaryio/bundle-size
Browse files Browse the repository at this point in the history
Uses "terser" plugin to compress the built bundle
  • Loading branch information
artem-zakharchenko authored Dec 13, 2019
2 parents 4d5c0a9 + db1d4fa commit 5d90dda
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 1 deletion.
89 changes: 89 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"rollup": "1.27.9",
"rollup-plugin-commonjs": "10.1.0",
"rollup-plugin-node-resolve": "5.2.0",
"rollup-plugin-terser": "5.1.3",
"semantic-release": "15.13.31",
"sinon": "7.5.0"
},
Expand Down
5 changes: 4 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');
const json = require('@rollup/plugin-json/dist');
const { terser } = require('rollup-plugin-terser');

const packageJson = require('./package.json');

const buildUmd = {
Expand All @@ -21,7 +23,8 @@ const buildUmd = {
preferBuiltins: false
}),
json(),
commonjs()
commonjs(),
terser()
]
};

Expand Down

0 comments on commit 5d90dda

Please sign in to comment.