From 4f0e885494a1c010ae1f6ddcbda4b7048d46dc09 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 27 Oct 2021 23:04:35 +0200 Subject: [PATCH] ci: keep function names when minifying code --- rollup.config.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index ca01e81..f6c9903 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -5,12 +5,17 @@ const sourcemaps = require('rollup-plugin-sourcemaps'); const { terser } = require('rollup-plugin-terser'); -module.exports = { +/** + * @type {import('rollup').RollupOptions} + */ +const config = { input: 'src/module/darkness-dependent-vision.js', output: { dir: 'dist/module', format: 'es', sourcemap: true, }, - plugins: [sourcemaps(), process.env.NODE_ENV === 'production' && terser()], + plugins: [sourcemaps(), process.env.NODE_ENV === 'production' && terser({ ecma: 2020, keep_fnames: true })], }; + +module.exports = config;