ci: keep function and class names in production builds
This commit is contained in:
parent
e8cce53fd2
commit
5ef25e7c4a
1 changed files with 11 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue