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