build: use Terser for production minification

- Add terser devDependency and set build.minify to "terser" in production
- Enable source maps only for non-production builds
- Disable minification for dev builds
- Terser options: mangle names, strip comments, 2 compress passes
This commit is contained in:
scamiv
2026-02-08 04:05:17 +01:00
parent 8cc6c2c2aa
commit d67bfffe62
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -78,6 +78,7 @@
"sinon": "^21.0.1",
"sinon-chai": "^4.0.0",
"tailwindcss": "^4.1.18",
"terser": "^5.42.0",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.26.0",