+import os from 'os'
import terser from '@rollup/plugin-terser'
import typescript from '@rollup/plugin-typescript'
import analyze from 'rollup-plugin-analyzer'
const isAnalyzeBuild = process.env.ANALYZE
const isDocumentationBuild = process.env.DOCUMENTATION
+const maxWorkers = os.cpus().length / 2
+
export default {
input: 'src/index.ts',
strictDeprecations: true,
}),
...(!isDevelopmentBuild && {
file: 'lib/index.js',
- plugins: [terser({ maxWorkers: 2 })]
+ plugins: [terser({ maxWorkers })]
})
},
{
}),
...(!isDevelopmentBuild && {
file: 'lib/index.mjs',
- plugins: [terser({ maxWorkers: 2 })]
+ plugins: [terser({ maxWorkers })]
})
}
],