import typescript from '@rollup/plugin-typescript'
-import del from 'rollup-plugin-delete'
import { defineConfig } from 'rollup'
+import del from 'rollup-plugin-delete'
export default defineConfig({
+ external: ['fastify', /^node:*/, 'poolifier'],
input: ['./src/main.ts', './src/worker.ts'],
- strictDeprecations: true,
output: [
{
- format: 'cjs',
+ chunkFileNames: '[name]-[hash].cjs',
dir: './dist',
- sourcemap: true,
entryFileNames: '[name].cjs',
- chunkFileNames: '[name]-[hash].cjs'
+ format: 'cjs',
+ sourcemap: true,
},
{
- format: 'esm',
dir: './dist',
- sourcemap: true
- }
+ format: 'esm',
+ sourcemap: true,
+ },
],
- external: ['fastify', 'node:path', 'node:url', 'poolifier'],
plugins: [
typescript(),
del({
- targets: ['./dist/*']
- })
- ]
+ targets: ['./dist/*'],
+ }),
+ ],
+ strictDeprecations: true,
})