Skip to content

Commit e0f856a

Browse files
committed
improvement(ci): omit unused browser maps from acceptance builds
1 parent afa8df6 commit e0f856a

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/checks.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,7 @@ jobs:
997997
# lint's type-check and the `build` job's own `next build` (generated route types too)
998998
# already enforce.
999999
NEXT_BUILD_SKIP_TYPE_CHECK: 'true'
1000+
NEXT_BUILD_SKIP_SOURCE_MAPS: 'true'
10001001
run: bunx turbo run build --filter=@sim/app
10011002

10021003
# Everything `next start` reads, including the spreadsheet parse worker it spawns (named, so a

‎apps/sim/lib/core/config/env.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ export const env = createEnv({
347347
// Infrastructure & Deployment
348348
NEXT_RUNTIME: z.string().optional(), // Next.js runtime environment
349349
DOCKER_BUILD: z.boolean().optional(), // Flag indicating Docker build environment
350+
NEXT_BUILD_SKIP_SOURCE_MAPS: z.boolean().optional(), // Omits unused browser source maps in acceptance builds
350351
NEXT_BUILD_SKIP_TYPE_CHECK: z.boolean().optional(), // Skips `next build`'s TypeScript pass where another CI job type-checks
351352

352353
// Background Jobs & Scheduling

‎apps/sim/next.config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const nextConfig: NextConfig = {
3030
// Safe here since this repo's source is already fully public on GitHub -
3131
// no additional exposure versus Next's default (disabled to avoid leaking
3232
// source on the client).
33-
productionBrowserSourceMaps: true,
33+
productionBrowserSourceMaps: !isTruthy(env.NEXT_BUILD_SKIP_SOURCE_MAPS),
3434
turbopack: {
3535
root: path.join(import.meta.dirname, '../..'),
3636
},

‎apps/sim/turbo.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
]
208208
},
209209
"build": {
210-
"env": ["NEXT_BUILD_SKIP_TYPE_CHECK"],
210+
"env": ["NEXT_BUILD_SKIP_SOURCE_MAPS", "NEXT_BUILD_SKIP_TYPE_CHECK"],
211211
"inputs": [
212212
"$TURBO_DEFAULT$",
213213
".env*",

0 commit comments

Comments
 (0)