ci: keep function names when minifying code
This commit is contained in:
parent
e8674b84c8
commit
4f0e885494
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue