-
Notifications
You must be signed in to change notification settings - Fork 4
/
rollup.config.dev.js
34 lines (32 loc) · 963 Bytes
/
rollup.config.dev.js
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
import typescript from "rollup-plugin-typescript2";
import { readFileSync } from "fs";
// Just want to override tslib from the rollup-plugin-typescript2
const tslib = readFileSync("./src/tslib.js", "utf-8");
export default {
input: 'src/index.ts',
output: [
{
file: './build/bundle.mjs',
format: 'esm',
sourcemap: true,
freeze: false
},
...(process.env.FULL ? [
{
file: './build/bundle.cjs',
format: 'commonjs',
sourcemap: true,
freeze: false
}, {
name: '__IteratorHelpersPolyfill',
file: './build/bundle.js',
format: 'umd',
sourcemap: true,
freeze: false
}
] : [])
],
plugins: [
Object.create(typescript(), { load: { value: x => x === "\0tslib.js" ? tslib : null } })
]
};