-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.ts
More file actions
28 lines (26 loc) · 790 Bytes
/
rollup.config.ts
File metadata and controls
28 lines (26 loc) · 790 Bytes
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
import commonjs from '@rollup/plugin-commonjs';
import nodeResolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
// https://rollupjs.org/configuration-options
const config = {
input: 'src/main.ts',
output: {
file: 'dist/main.js',
format: 'es',
generatedCode: 'es2015',
interop: 'esModule',
sourcemap: false,
validate: true,
esModule: true,
},
plugins: [typescript(), nodeResolve({preferBuiltins: true}), commonjs()],
context: undefined,
moduleContext: undefined,
onwarn(warning: {code: string}, handler: (warning: {code: string}) => void) {
if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'CIRCULAR_DEPENDENCY') {
return;
}
handler(warning);
},
};
export default config;