forked from bitbubbler/yet-another-dcs-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
35 lines (32 loc) · 842 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
34
35
import pkg from './package.json'
import commonjs from '@rollup/plugin-commonjs'
import json from '@rollup/plugin-json'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'
import tsConfig from './tsconfig.json'
export default {
input: 'src/index.ts',
output: {
file: 'build/dcs-server.js',
format: 'cjs',
sourcemap: 'inline',
},
external: Object.keys(pkg.dependencies),
plugins: [
commonjs(),
nodeResolve({ preferBuiltins: true }),
json(),
typescript({
compilerOptions: {
...tsConfig.compilerOptions,
module: 'esnext',
},
}),
],
onwarn(warning, warn) {
// suppress known okay warnings
if (warning.code === 'EVAL') return
if (warning.code === 'CIRCULAR_DEPENDENCY') return
warn(warning)
},
}