aboutsummaryrefslogtreecommitdiffstats
path: root/.config/rollup.polyfills.js
blob: 1df059a540efad04a9f4b70d139bf48eeed6f1ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
import filesize from 'rollup-plugin-filesize'

// We dont need babel. All polyfills are compatible
const config = (ie) => ({
  input: ie ? './.config/polyfillListIE.js' : './.config/polyfillList.js',
  output: {
    file: ie ? 'dist/polyfillsIE.js' : 'dist/polyfills.js',
    sourceMap: false,
    format: 'iife'
  },
  plugins: [
    resolve({ browser: true }),
    commonjs(),
    terser(),
    filesize()
  ]
})

export default [false, true].map(config)