-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
32 lines (31 loc) · 903 Bytes
/
rollup.config.mjs
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
import typescript from '@rollup/plugin-typescript'
export default {
input: 'src/index.ts',
external: ['flow-remove-types'],
strictDeprecations: true,
output: [
{
format: 'cjs',
file: './dist/cjs/index.js',
exports: 'named',
footer: 'module.exports = Object.assign(exports.default, exports);',
sourcemap: true,
},
{
format: 'es',
file: './dist/es/index.js',
plugins: [{
name: 'emit-module-package-file',
generateBundle() {
this.emitFile({
type: 'asset',
fileName: 'package.json',
source: `{"type":"module"}`
})
},
}],
sourcemap: true,
},
],
plugins: [typescript()],
}