-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.test.ts
59 lines (55 loc) · 1.59 KB
/
rollup.config.test.ts
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* eslint-disable spaced-comment */
///<reference path="./src/typings/rollup-plugin-babel.d.ts" />
///<reference path="./src/typings/rollup-plugin-node-builtins.d.ts" />
///<reference path="./src/typings/rollup-plugin-node-globals.d.ts" />
///<reference path="./src/typings/rollup-plugin-node-resolve.d.ts" />
///<reference path="./src/typings/rollup-plugin-commonjs.d.ts" />
/* eslint-enable spaced-comment */
import { RollupWatchOptions } from 'rollup';
import babel = require('rollup-plugin-babel');
import builtins = require('rollup-plugin-node-builtins');
import globals = require('rollup-plugin-node-globals');
import cjs = require('rollup-plugin-commonjs');
import npm = require('rollup-plugin-node-resolve');
const config: RollupWatchOptions = {
input: 'test/index.ts',
output: {
format: 'iife',
sourcemap: 'inline'
},
plugins: [
builtins(),
npm({
extensions: ['.ts', '.js']
}),
cjs({
include: 'node_modules/**',
exclude: [
'node_modules/rollup-plugin-node-builtins/**',
'node_modules/buffer-es6/**',
'node_modules/process-es6/**'
],
ignoreGlobal: true
}),
babel({
include: './**/*.ts',
exclude: 'node_modules/**',
// runtimeHelpers: true,
presets: [
['@babel/env', { modules: false }],
'@babel/typescript'
],
plugins: [
['@babel/proposal-class-properties', { loose: false }],
['istanbul', {
exclude: [
'test/**',
'src/utils/getProto.ts'
]
}]
]
}),
globals()
]
};
export default config;