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
1234567891011121314151617181920212223242526272829const {terser} = require("rollup-plugin-terser")
module.exports = { // This function will run for each entry/format/env combination rollup(config, options) { if (options.format === "esm" || options.env === "production") { config.plugins.push( terser({ sourcemap: true, module: true, compress: { hoist_funs: true, passes: 2, keep_fargs: false, pure_getters: true, unsafe: true }, mangle: { properties: { regex: /_$/ } } }) ) } return config }}