ci: keep function and class names in production builds

This commit is contained in:
Johannes Loher 2021-10-27 19:11:43 +02:00
parent e8cce53fd2
commit 5ef25e7c4a

View file

@ -6,12 +6,21 @@ const typescript = require("rollup-plugin-typescript2");
const sourcemaps = require("rollup-plugin-sourcemaps");
const { terser } = require("rollup-plugin-terser");
module.exports = {
/**
* @type {import('rollup').RollupOptions}
*/
const config = {
input: "src/module/ds4.ts",
output: {
dir: "dist/module",
format: "es",
sourcemap: true,
},
plugins: [sourcemaps(), typescript({}), process.env.NODE_ENV === "production" && terser()],
plugins: [
sourcemaps(),
typescript({}),
process.env.NODE_ENV === "production" && terser({ ecma: 2020, keep_fnames: true }),
],
};
module.exports = config;