-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
31 lines (27 loc) · 943 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
import pkg from './package.json';
import typescript from 'rollup-plugin-typescript2';
import {terser} from 'rollup-plugin-terser';
export default [
{
input: './src/Lib.ts',
external: ['sodiumjs'],
output: [
{ file: pkg.main, format: 'cjs', sourcemap: true },
{ file: pkg.module, format: 'esm', sourcemap: true },
{ file: 'dist/domsubi.min.js', format: 'esm', sourcemap: true, plugins: [terser({ module: true })] }
],
plugins: [
typescript({
tsconfigOverride: {
compilerOptions: {
module: "es2020",
target: "es2020",
declaration: true,
moduleResolution: "node"
}
},
useTsconfigDeclarationDir: true,
})
]
}
];