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: [/^node:*/, 'poolifier', 'ws'],
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: ['node:path', 'node:url', 'poolifier', 'ws'],
plugins: [
typescript(),
del({
- targets: ['./dist/*']
- })
- ]
+ targets: ['./dist/*'],
+ }),
+ ],
+ strictDeprecations: true,
})