aboutsummaryrefslogtreecommitdiff
path: root/rollup.config.js
blob: f73c62d233b67cc5519dad11a45cfbdc9ce65d50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import babel from "rollup-plugin-babel";
import { uglify } from "rollup-plugin-uglify";
import { version } from "./package.json";

export default [ {
    input: "src/index.js",
    output: {
        file: `dist/bundle-${version}.js`,
        format: "iife",
        name: "Github"
    },
    plugins: [
        babel({
            babelrc: false,
            comments: true,
            presets: [ [ "es2015", { modules: false } ] ]
        })
    ]
},
{
    input: "src/index.js",
    output: {
        file: `dist/bundle-${version}.min.js`,
        format: "iife",
        name: "Github"
    },
    plugins: [
        babel({
            babelrc: false,
            comments: false,
            presets: [ [ "es2015", { modules: false } ] ]
        }),
        uglify({
            ie8: true,
            sourcemap: true,
            toplevel: false,
            warnings: true
        })
    ]
} ];