Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
chore(build): remove the unused ASSETS_URL asset CDN base (#2038)
Sid08c48bd1355c
diff --git a/.claude/rules/service-workers.md b/.claude/rules/service-workers.mdindex 27275be8c2..cb86c30169 100644--- a/.claude/rules/service-workers.md+++ b/.claude/rules/service-workers.md@@ -46,8 +46,7 @@ no Biome, no typecheck, no bundling. Check them with `node --check`.Same navigate/offline behaviour, plus `ASSET_CACHE`: `/assets/*` (content-hashedbuild files) cache-first, trimmed to 400 entries; icons, logos and the manifest-stale-while-revalidate. Same-origin only, so a CDN asset base (`ASSETS_URL`) is-untouched. It never caches a page, loader data or a private file, so nothing+stale-while-revalidate. Same-origin only. It never caches a page, loader data or a private file, so nothingoutlives a sign-out. `SHELL_CACHE` (the offline page) and `ASSET_CACHE` have theirown versions.diff --git a/Dockerfile b/Dockerfileindex 1b01d8bfbf..c19969e7c7 100644--- a/Dockerfile+++ b/Dockerfile@@ -32,11 +32,6 @@ RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store,sharing=locked \FROM deps AS buildARG APP-# CDN base for client assets, baked into the build (vite base is build-time;-# apps/*/vite.config.ts normalizes the trailing slash). Empty keeps assets-# same-origin — the controlled/air-gapped variant is this default, not a flag.-ARG ASSETS_URL-ENV ASSETS_URL=${ASSETS_URL}RUN --mount=type=cache,id=turbo,target=/repo/.turbo,sharing=locked \pnpm run build:${APP}# Build scratch `runner` must not inherit: .vite is the dep-optimizer cache,diff --git a/apps/erp/vite.config.ts b/apps/erp/vite.config.tsindex f453d418e7..d96aeb168f 100644--- a/apps/erp/vite.config.ts+++ b/apps/erp/vite.config.ts@@ -81,14 +81,6 @@ export default defineConfig(({ command, isSsrBuild, mode }) => {command === "build" ? ssrBuild : { noExternal: ssrNoExternal };return {- // ASSETS_URL bakes a CDN asset base into the client build (Dockerfile- // build arg). Vite's base is build-time only, so an image built without- // it serves assets same-origin — that IS the controlled/air-gapped- // variant, not a fallback. Normalized: Vite requires the trailing slash.- base:- command === "build" && process.env.ASSETS_URL- ? process.env.ASSETS_URL.replace(/\/*$/, "/")- : undefined,// Build analysis (plugin hook cost, chunks, duplicate packages). Opt-in,// because each build writes gigabytes to node_modules/.rolldown:// `VITE_DEVTOOLS=1 pnpm build`, then `pnpm exec vite-devtools`.diff --git a/apps/mes/public/service-worker.js b/apps/mes/public/service-worker.jsindex 10d6ebbd0c..149862d8c3 100644--- a/apps/mes/public/service-worker.js+++ b/apps/mes/public/service-worker.js@@ -170,7 +170,7 @@ self.addEventListener("fetch", (event) => {const { request } = event;if (request.method !== "GET") return;const url = new URL(request.url);- // Supabase, analytics, and a CDN asset base (ASSETS_URL) go straight out.+ // Supabase and analytics go straight out.if (url.origin !== self.location.origin) return;if (request.mode === "navigate") {diff --git a/apps/mes/vite.config.ts b/apps/mes/vite.config.tsindex 2e89158d24..1f76eca9df 100644--- a/apps/mes/vite.config.ts+++ b/apps/mes/vite.config.ts@@ -68,14 +68,6 @@ export default defineConfig(({ command, mode, isSsrBuild }) => {: { noExternal: ssrNoExternal };return {- // ASSETS_URL bakes a CDN asset base into the client build (Dockerfile- // build arg). Vite's base is build-time only, so an image built without- // it serves assets same-origin — that IS the controlled/air-gapped- // variant, not a fallback. Normalized: Vite requires the trailing slash.- base:- command === "build" && process.env.ASSETS_URL- ? process.env.ASSETS_URL.replace(/\/*$/, "/")- : undefined,// Build analysis (plugin hook cost, chunks, duplicate packages). Opt-in,// because each build writes gigabytes to node_modules/.rolldown:// `VITE_DEVTOOLS=1 pnpm build`, then `pnpm exec vite-devtools`.diff --git a/turbo.json b/turbo.jsonindex ae3f4e7895..373ca7c158 100644--- a/turbo.json+++ b/turbo.json@@ -5,7 +5,7 @@"build": {"dependsOn": ["^build", "//#lingui:compile"],"inputs": ["$TURBO_DEFAULT$", "!**/AGENTS.md", "!**/CLAUDE.md"],- "env": ["ASSETS_URL", "VERCEL"],+ "env": ["VERCEL"],"outputs": ["dist/**","build/**",