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