X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Ftypescript%2Fwebsocket-server-pool%2Fws-hybrid%2Frollup.config.ts;fp=examples%2Ftypescript%2Fwebsocket-server-pool%2Fws-hybrid%2Frollup.config.ts;h=6d2fc34da8437e298f208bc999592ab04acd7f0a;hb=c2515a41c44109efe5dfcb92db2fbc95dc5912ba;hp=0000000000000000000000000000000000000000;hpb=209917a749a1fb0095526d14840829dc845e9f54;p=poolifier.git diff --git a/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.ts b/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.ts new file mode 100644 index 00000000..6d2fc34d --- /dev/null +++ b/examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.ts @@ -0,0 +1,33 @@ +import typescript from '@rollup/plugin-typescript' +import del from 'rollup-plugin-delete' +import { defineConfig } from 'rollup' + +export default defineConfig({ + input: [ + './src/main.ts', + './src/websocket-server-worker.ts', + './src/request-handler-worker.ts' + ], + strictDeprecations: true, + output: [ + { + format: 'cjs', + dir: './dist', + sourcemap: true, + entryFileNames: '[name].cjs', + chunkFileNames: '[name]-[hash].cjs' + }, + { + format: 'esm', + dir: './dist', + sourcemap: true + } + ], + external: ['node:path', 'node:url', 'poolifier', 'ws'], + plugins: [ + typescript(), + del({ + targets: ['./dist/*'] + }) + ] +})