build: enable minification

This commit is contained in:
TopchetoEU 2025-01-06 17:06:10 +02:00
parent f6ce261485
commit 4ea14ca1f5
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4

View File

@ -7,7 +7,7 @@ const nodeResolve = require("@rollup/plugin-node-resolve");
const json = require("@rollup/plugin-json"); const json = require("@rollup/plugin-json");
const { resolve } = require("path"); const { resolve } = require("path");
const shouldMinify = () => false; const shouldMinify = () => true;
const shouldEmitSourcemaps = () => true; const shouldEmitSourcemaps = () => true;
const shouldPolyfill = () => !!process.env.POLYFILLS; const shouldPolyfill = () => !!process.env.POLYFILLS;
@ -99,6 +99,7 @@ const construct = (input, output) => defineConfig({
shouldMinify() && terser({ shouldMinify() && terser({
sourceMap: shouldEmitSourcemaps(), sourceMap: shouldEmitSourcemaps(),
keep_classnames: true, keep_classnames: true,
keep_fnames: true,
}), }),
], ],
output: { output: {