tsdx.config.js
This file
Path
tsdx.config.js
28 lines · 547 bytes · JavaScript
Last changed by
Merge pull request #536 from immerjs/multi-bundleMichel Weststratebefore adoption0d87fc8
History of this fileTake it
Merge pull request #536 from immerjs/multi-bundleMichel Weststratebefore adoption0d87fc8
lines 1–28why, one step back1const {terser} = require("rollup-plugin-terser")23module.exports = {4 // This function will run for each entry/format/env combination5 rollup(config, options) {6 if (options.format === "esm" || options.env === "production") {7 config.plugins.push(8 terser({9 sourcemap: true,10 module: true,11 compress: {12 hoist_funs: true,13 passes: 2,14 keep_fargs: false,15 pure_getters: true,16 unsafe: true17 },18 mangle: {19 properties: {20 regex: /_$/21 }22 }23 })24 )25 }26 return config27 }28}