aboutsummaryrefslogtreecommitdiffstats
path: root/.config/rollup.polyfills.js
diff options
context:
space:
mode:
Diffstat (limited to '.config/rollup.polyfills.js')
-rw-r--r--.config/rollup.polyfills.js36
1 files changed, 19 insertions, 17 deletions
diff --git a/.config/rollup.polyfills.js b/.config/rollup.polyfills.js
index 810db91..1df059a 100644
--- a/.config/rollup.polyfills.js
+++ b/.config/rollup.polyfills.js
@@ -1,20 +1,22 @@
-import { uglify } from "rollup-plugin-uglify"
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'
-export default [
- {
- input: './.config/polyfillList.js',
- output: {
- file: 'dist/polyfills.js',
- name: 'polyfills',
- sourceMap: 'external',
- format: 'iife'
- },
- plugins: [
- resolve({browser: true}),
- commonjs(),
- uglify()
- ]
- }
-]
+// 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)