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' | |
5d4b2a88 | 4 | import { defineConfig } from 'rollup' |
418077df | 5 | |
5d4b2a88 | 6 | export default defineConfig({ |
78cdf6bc | 7 | input: ['./src/main.ts', './src/worker.ts'], |
418077df JB |
8 | strictDeprecations: true, |
9 | output: [ | |
10 | { | |
11 | format: 'cjs', | |
78cdf6bc | 12 | dir: './dist', |
418077df | 13 | sourcemap: true, |
efaeaba6 JB |
14 | entryFileNames: '[name].cjs', |
15 | chunkFileNames: '[name]-[hash].cjs' | |
418077df JB |
16 | }, |
17 | { | |
18 | format: 'esm', | |
78cdf6bc | 19 | dir: './dist', |
2b6c61ec | 20 | sourcemap: true |
418077df JB |
21 | } |
22 | ], | |
23 | external: ['fastify', 'node:path', 'node:url', 'poolifier'], | |
24 | plugins: [ | |
25 | typescript(), | |
26 | del({ | |
78cdf6bc | 27 | targets: ['./dist/*'] |
418077df JB |
28 | }) |
29 | ] | |
5d4b2a88 | 30 | }) |