Generate documentation
[poolifier.git] / rollup.config.mjs
index 46c1a17fd3dc78e170014ba333ca8a71fe760306..e1bdac21fe03b621fa5b4e81d2c73b3e2ef5be52 100644 (file)
@@ -1,9 +1,8 @@
+import terser from '@rollup/plugin-terser'
+import typescript from '@rollup/plugin-typescript'
 import analyze from 'rollup-plugin-analyzer'
 import command from 'rollup-plugin-command'
 import del from 'rollup-plugin-delete'
-import istanbul from 'rollup-plugin-istanbul'
-import { terser } from 'rollup-plugin-terser'
-import ts from 'rollup-plugin-ts'
 
 const isDevelopmentBuild = process.env.BUILD === 'development'
 const isAnalyze = process.env.ANALYZE
@@ -17,17 +16,15 @@ export default {
     sourcemap: !!isDevelopmentBuild,
     ...(isDevelopmentBuild && { preserveModules: true }),
     ...(isDevelopmentBuild && { preserveModulesRoot: 'src' }),
-    ...(!isDevelopmentBuild && { plugins: [terser({ numWorkers: 2 })] })
+    ...(!isDevelopmentBuild && { plugins: [terser({ maxWorkers: 2 })] })
   },
   external: ['async_hooks', 'cluster', 'events', 'os', 'worker_threads'],
   plugins: [
-    ts({
+    typescript({
       tsconfig: isDevelopmentBuild
         ? 'tsconfig.development.json'
-        : 'tsconfig.json',
-      browserslist: false
+        : 'tsconfig.production.json'
     }),
-    isDevelopmentBuild && istanbul(),
     del({
       targets: ['lib/*']
     }),