fix: Increase DART VM old generation heap size and add flutter clean to the build process.

This commit is contained in:
Michael committed 2025-12-08 12:53:32 +01:00
1 parent 7e9b7fa6e6
commit f8060bc952
1 file changed
+4 -1
+4 -1
View File
@@ -11,7 +11,7 @@ WORKDIR /app
RUN git config --global --add safe.directory /app
# Optimize DART VM Memory for build to prevent OOM
ENV DART_VM_OPTIONS="--old_gen_heap_size=2048"
ENV DART_VM_OPTIONS="--old_gen_heap_size=4096"
# Enable web support (idempotent)
RUN flutter config --enable-web
@@ -29,6 +29,9 @@ COPY . .
# Re-run pub get after copying source to ensure lockfile consistency
RUN flutter pub get
# Clean build environment to avoid conflicts
RUN flutter clean
# Build web application (CanvasKit renderer is now default)
# Added --no-tree-shake-icons to prevent potential font issues in some environments
RUN flutter build web --release --base-href="/" --no-tree-shake-icons