Merge pull request #1074 from poolifier/combined-prs-branch
[poolifier.git] / examples / typescript / http-server-pool / fastify-hybrid / rollup.config.mjs
CommitLineData
3b311539
JB
1/* eslint-disable n/no-unpublished-import */
2import typescript from '@rollup/plugin-typescript'
3import del from 'rollup-plugin-delete'
5d4b2a88 4import { defineConfig } from 'rollup'
3b311539 5
5d4b2a88 6export default defineConfig({
3b311539 7 input: [
78cdf6bc
JB
8 './src/main.ts',
9 './src/fastify-worker.ts',
10 './src/request-handler-worker.ts'
3b311539
JB
11 ],
12 strictDeprecations: true,
13 output: [
14 {
15 format: 'cjs',
78cdf6bc 16 dir: './dist',
3b311539 17 sourcemap: true,
2b6c61ec 18 entryFileNames: '[name].cjs'
3b311539
JB
19 },
20 {
21 format: 'esm',
78cdf6bc 22 dir: './dist',
2b6c61ec 23 sourcemap: true
3b311539
JB
24 }
25 ],
26 external: ['fastify', 'fastify-plugin', 'node:path', 'node:url', 'poolifier'],
27 plugins: [
28 typescript(),
29 del({
78cdf6bc 30 targets: ['./dist/*']
3b311539
JB
31 })
32 ]
5d4b2a88 33})