Skip to content

Commit

Permalink
Changed UMD version of package to be ES5 compatible (addition for CY-…
Browse files Browse the repository at this point in the history
…1473)
  • Loading branch information
qooban committed Aug 1, 2019
1 parent ca1be6f commit a83f6c8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
10 changes: 10 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 @@ -19,6 +19,7 @@
"jest": "^24.8.0",
"prettier": "^1.18.2",
"rollup": "^1.16.7",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.1",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^5.1.1"
Expand Down
10 changes: 8 additions & 2 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 { terser } from 'rollup-plugin-terser';
import pkg from './package.json';

export default [
// browser-friendly UMD build
// browser-friendly UMD build - ES5
{
input: 'src/index.js',
output: {
Expand All @@ -13,7 +14,12 @@ export default [
format: 'umd',
sourcemap: true
},
plugins: [resolve(), commonjs(), terser()]
plugins: [
resolve(),
commonjs(),
babel({ presets: ['@babel/preset-env'], exclude: 'node_modules/**' }),
terser()
]
},

// CommonJS (for Node) and ES module (for bundlers) build.
Expand Down

0 comments on commit a83f6c8

Please sign in to comment.