From d0dfa436ed2b400947ba6d01191dd78f5e55cb64 Mon Sep 17 00:00:00 2001 From: petruki <31597636+petruki@users.noreply.github.com> Date: Sat, 29 Aug 2026 16:44:20 -0700 Subject: [PATCH] fix: prod build failure caused by legacy-peer-deps when prune --- .github/workflows/master.yml | 2 ++ Dockerfile | 4 ++-- .../documentation.module.ts | 19 ++++++++++--------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 51d120ba..73d018e0 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -27,6 +27,8 @@ jobs: run: | npm ci npm run lint + npm run build:prod + npm prune --omit=dev --legacy-peer-deps docker: name: Publish Docker Image diff --git a/Dockerfile b/Dockerfile index ef1a6fed..179cc427 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,10 +12,10 @@ COPY ./ /usr/local/app/ # Install all dependencies, both production and development, build, and remove dev dependencies RUN npm ci && \ npm run build:prod && \ - npm prune --omit=dev + npm prune --omit=dev --legacy-peer-deps # ---------- Release ---------- -FROM nginx:1.31.3-alpine-slim +FROM nginx:1.31.4-alpine-slim # Copy nginx config file RUN rm -rf /usr/share/nginx/html/* && rm -rf /etc/nginx/nginx.conf diff --git a/src/app/documentation-module/documentation.module.ts b/src/app/documentation-module/documentation.module.ts index c689a2fb..361b3c15 100644 --- a/src/app/documentation-module/documentation.module.ts +++ b/src/app/documentation-module/documentation.module.ts @@ -1,17 +1,18 @@ import { NgModule, SecurityContext } from '@angular/core'; -import { MarkdownModule, SANITIZE } from 'ngx-markdown'; +import { provideMarkdown, SANITIZE } from 'ngx-markdown'; import { DocumentationRoutingModule } from './documentation.routing'; @NgModule({ imports: [ - DocumentationRoutingModule, - MarkdownModule.forRoot({ - sanitize: { - provide: SANITIZE, - useValue: SecurityContext.NONE - }, - }), - MarkdownModule.forChild() + DocumentationRoutingModule + ], + providers: [ + provideMarkdown({ + sanitize: { + provide: SANITIZE, + useValue: SecurityContext.NONE + }, + }) ] }) export class DocumentationModuleModule { }