97efb44f27e6e75f40ccf2ad17be198062a98ea4
[poolifier.git] / examples / typescript / websocket-server-pool / ws-hybrid / rollup.config.ts
1 import typescript from '@rollup/plugin-typescript'
2 import del from 'rollup-plugin-delete'
3 import { defineConfig } from 'rollup'
4
5 export default defineConfig({
6 input: [
7 './src/main.ts',
8 './src/websocket-server-worker.ts',
9 './src/request-handler-worker.ts'
10 ],
11 strictDeprecations: true,
12 output: [
13 {
14 format: 'cjs',
15 dir: './dist',
16 sourcemap: true,
17 entryFileNames: '[name].cjs',
18 chunkFileNames: '[name]-[hash].cjs'
19 },
20 {
21 format: 'esm',
22 dir: './dist',
23 sourcemap: true
24 }
25 ],
26 external: [/^node:*/, 'poolifier', 'ws'],
27 plugins: [
28 typescript(),
29 del({
30 targets: ['./dist/*']
31 })
32 ]
33 })