-
Notifications
You must be signed in to change notification settings - Fork 41
/
rollup.config.js
26 lines (22 loc) · 927 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
import typescript from '@rollup/plugin-typescript';
export default [
// https://github.com/microsoft/TypeScript/issues/18442#issuecomment-749896695
{
preserveModules: false,
input: ['src/index.ts'],
output: [{ dir: 'build/esm', format: 'esm', entryFileNames: '[name].mjs', sourcemap: true }],
plugins: [typescript({ tsconfig: './tsconfig/tsconfig.esm.json' })],
},
{
preserveModules: false,
input: ['src/index.ts'],
output: [{ dir: 'build/cjs', format: 'cjs', entryFileNames: '[name].js', sourcemap: true }],
plugins: [typescript({ tsconfig: './tsconfig/tsconfig.cjs.json' })],
},
{
preserveModules: false,
input: ['src/index.ts'],
output: [{ dir: 'build/umd', name: "schema", format: 'umd', entryFileNames: '[name].js' }],
plugins: [typescript({ tsconfig: './tsconfig/tsconfig.cjs.json' })],
},
];