build(Makefile): replace old webpack-based frontend bundling with static bundling using esbuild

This commit is contained in:
Sarah Vaupel 2024-10-03 22:07:25 +02:00
parent 1ed27efccf
commit bae8ccc45a

View File

@ -42,7 +42,7 @@ help:
.PHONY: clean
# HELP: remove all compilation results in the directory but leave containers and images unharmed
clean:
rm -rf node_modules .npm .cache assets/icons assets/favicons static well-known
rm -rf node_modules .npm .cache assets/icons assets/favicons static
rm -rf .stack .stack-work .stack-work-build .stack-work-run .stack-work-test .stack-work-doc
rm -rf bin/ .Dockerfile .dev-port-http .dev-port-https
.PHONY: clean-all
@ -115,11 +115,11 @@ test: test-frontend test-backend i18n-check
%-frontend: FRADRIVE_SERVICE=frontend
%-frontend: --image-build --containerized---%-frontend;
--%-frontend: --containerized---frontend-dependencies-frontend;
--%-frontend: --containerized-static-frontend;
# HELP(compile-frontend): compile frontend
--compile-frontend: --frontend-dependencies
npx -- webpack --progress $(WATCH)
--compile-frontend: static
npm run build
.PHONY: serve-frontend
# HELP: serve frontend (watch file changes)
@ -140,8 +140,6 @@ serve-frontend:
@echo Karma frontend tests are currently broken after npm update and have therefor been temporarily disabled.
# npx -- karma start --conf karma.conf.cjs $(WATCH)
--frontend-dependencies: node_modules package.json package-lock.json assets;
node_modules: package.json package-lock.json
npm ci --cache .npm --prefer-offline
@ -155,8 +153,8 @@ assets/icons: node_modules
./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/solid utils/rename-fa.json assets/icons/fradrive
./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/regular utils/rename-fa.json assets/icons/fradrive
well-known: node_modules assets
npx webpack --progress
static: node_modules esbuild.config.mjs assets
npm run build
##### FRONTEND TARGETS #####
############################