From 9af652eab1f63f84f21a67ffa711ea30104a5fc3 Mon Sep 17 00:00:00 2001 From: nichenqin Date: Wed, 23 Oct 2024 12:25:12 +0800 Subject: [PATCH] chore: try to add cdn --- Dockerfile | 3 +++ apps/frontend/svelte.config.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 340e78f45..f35d25f82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM node:22 as builder +ARG CDN_URL +ENV PUBLIC_CDN_URL=$CDN_URL + WORKDIR /usr/src/app RUN npm i -g bun diff --git a/apps/frontend/svelte.config.js b/apps/frontend/svelte.config.js index d236ed9ea..1a379510c 100644 --- a/apps/frontend/svelte.config.js +++ b/apps/frontend/svelte.config.js @@ -12,6 +12,9 @@ const config = { pages: "dist", fallback: "index.html", }), + paths: { + assets: import.meta.env.PUBLIC_CDN_URL || "", + }, env: { publicPrefix: "UNDB_PUBLIC_", },