-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.js
33 lines (32 loc) · 905 Bytes
/
rollup.config.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
import json from '@rollup/plugin-json';
import commonjs from 'rollup-plugin-commonjs';
import del from 'rollup-plugin-delete';
import ttypescript from 'ttypescript';
import typescript from 'rollup-plugin-typescript2';
// eslint-disable-next-line import/no-anonymous-default-export
export default {
input: './index.ts',
output: {
dir: 'dist',
format: 'cjs',
sourcemap: process.env.BUILD === 'production' ? false : true,
},
plugins: [
del({ targets: 'dist/*' }),
typescript({
typescript: ttypescript,
tsconfig: 'tsconfig.json',
tsconfigOverride: {
exclude: ['./test/**'],
// index.ts is included here and not in tsconfig.ts so relative imports
// are imported correctly by VS Code.
include: ['src', 'index.ts'],
compilerOptions: {
rootDir: './',
},
},
}),
json(),
commonjs(),
],
};