setup-cpp/.terserrc.mjs

12 lines
296 B
JavaScript
Raw Normal View History

import { buildTerserOptions } from "terser-config-atomic/dist/builder.js"
2024-09-21 07:24:50 +08:00
const config = buildTerserOptions(process.env.NODE_ENV, undefined, true)
if (
typeof config.compress === "object"
&& "unsafe_math" in config.compress
) {
config.compress.unsafe_math = false
}
2024-09-21 07:24:50 +08:00
export default config