-import typescript from 'rollup-plugin-typescript2'
import analyze from 'rollup-plugin-analyzer'
-import { terser } from 'rollup-plugin-terser'
+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
+const isDocumentation = process.env.DOCUMENTATION
export default {
input: 'src/index.ts',
},
external: ['async_hooks', 'cluster', 'events', 'worker_threads'],
plugins: [
- typescript({
+ ts({
tsconfig: isDevelopmentBuild
? 'tsconfig.development.json'
- : 'tsconfig.json'
+ : 'tsconfig.json',
+ browserslist: false
}),
+ isDevelopmentBuild && istanbul(),
del({
targets: ['lib/*']
}),
- isAnalyze && analyze()
+ isAnalyze && analyze(),
+ isDocumentation && command('npm run typedoc')
]
}