/* eslint-disable n/no-unpublished-import */
+import { cpus } from 'node:os';
+
import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
{
dir: 'dist',
format: 'esm',
- exports: 'auto',
- ...(isDevelopmentBuild && { sourcemap: true }),
- ...(!isDevelopmentBuild && { plugins: [terser({ maxWorkers: 2 })] }),
+ sourcemap: !!isDevelopmentBuild,
+ plugins: [terser({ maxWorkers: cpus().length / 2 })],
},
],
external: [