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 sourcemaps = require('rollup-plugin-sourcemaps');
|
||||||
const { terser } = require('rollup-plugin-terser');
|
const { terser } = require('rollup-plugin-terser');
|
||||||
|
|
||||||
module.exports = {
|
/**
|
||||||
|
* @type {import('rollup').RollupOptions}
|
||||||
|
*/
|
||||||
|
const config = {
|
||||||
input: 'src/module/darkness-dependent-vision.js',
|
input: 'src/module/darkness-dependent-vision.js',
|
||||||
output: {
|
output: {
|
||||||
dir: 'dist/module',
|
dir: 'dist/module',
|
||||||
format: 'es',
|
format: 'es',
|
||||||
sourcemap: true,
|
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