Commit | Line | Data |
---|---|---|
418077df JB |
1 | /* eslint-disable n/no-unpublished-import */ |
2 | import typescript from '@rollup/plugin-typescript' | |
3 | import del from 'rollup-plugin-delete' | |
4 | ||
5 | export default { | |
6 | input: ['src/main.ts', 'src/worker.ts'], | |
7 | strictDeprecations: true, | |
8 | output: [ | |
9 | { | |
10 | format: 'cjs', | |
11 | dir: 'dist', | |
12 | sourcemap: true, | |
13 | entryFileNames: '[name].cjs', | |
14 | preserveModules: true, | |
15 | preserveModulesRoot: 'src' | |
16 | }, | |
17 | { | |
18 | format: 'esm', | |
19 | dir: 'dist', | |
20 | sourcemap: true, | |
21 | preserveModules: true, | |
22 | preserveModulesRoot: 'src' | |
23 | } | |
24 | ], | |
25 | external: ['fastify', 'node:path', 'node:url', 'poolifier'], | |
26 | plugins: [ | |
27 | typescript(), | |
28 | del({ | |
29 | targets: ['dist/*'] | |
30 | }) | |
31 | ] | |
32 | } |