.. include:: /Includes.rst.txt .. _task-1791146677: =================================== Task: Deliver the frontend minified =================================== Description =========== The scripts and styles every package ships in its ``public/`` folder are now minified (scripts with terser, which also removes the whitespace and comments esbuild keeps in a library build; styles compressed by Sass). Source maps are no longer part of the build: ``npm run build -- --sourcemap`` (``Build/Scripts/runTests.sh -s buildJs -- --sourcemap``, ``ddev vite --sourcemap``) writes them for local debugging, and they are git-ignored. A ``pre-push`` hook in ``Build/git-hooks/`` refuses a push whose commits carry a build made with maps; activate it once with ``git config core.hooksPath Build/git-hooks``. Impact ====== Pages load less script and style data. To debug the TypeScript or SCSS in a browser, build locally with ``--sourcemap`` and rebuild without it before committing. .. index:: Frontend, package:adsum-core, package:adsum-leave, package:adsum-attendance, package:adsum-working-time, package:adsum-projects, package:adsum-reporting