feat(web): improve web build configuration and accessibility
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Successful in 14m6s
Test Suite / flutter-quality (push) Failing after 4m44s

- Add source maps and web renderer build arguments with defaults
- Configure Caddy with CSP headers, cache policies, and service worker handling
- Defer loading of import screen for performance optimization
- Add semantic labels to icons for accessibility
- Update web index.html with Swedish language, meta tags, and description
- Add robots.txt and lighthouse configuration
- Add new planning documents and archive entries
This commit is contained in:
Nils-Johan Gynther
2026-05-23 18:04:27 +02:00
parent 30d27d6b8a
commit 69bcc3e342
16 changed files with 1847 additions and 301 deletions
+14 -5
View File
@@ -14,11 +14,20 @@ RUN flutter gen-l10n
# Run tests
RUN flutter test
# Inject API base URL at build time via --dart-define.
# Default to same-origin /api to avoid mixed-content in HTTPS deployments.
ARG API_BASE_URL=/api
RUN flutter build web --release \
--dart-define=API_BASE_URL=${API_BASE_URL}
# Inject API base URL at build time via --dart-define.
# Default to same-origin /api to avoid mixed-content in HTTPS deployments.
ARG API_BASE_URL=/api
ARG SOURCE_MAPS=false
ARG WEB_RENDERER=auto
RUN set -eux; \
build_args="--release --dart-define=API_BASE_URL=${API_BASE_URL}"; \
if [ "${SOURCE_MAPS}" = "false" ]; then \
build_args="${build_args} --no-source-maps"; \
fi; \
if [ "${WEB_RENDERER}" != "auto" ]; then \
build_args="${build_args} --web-renderer=${WEB_RENDERER}"; \
fi; \
flutter build web ${build_args}
# Stage 2 Serve with Caddy
FROM caddy:alpine AS runner