Skip to content

Commit bfd0f46

Browse files
authored
improvement(next): bundle and CI cache config (#4478)
- drop redundant turbopack config (Next 16 defaults) - remove lucide-react/date-fns from optimizePackageImports (built-in defaults) - enable turbopackFileSystemCacheForBuild for warm CI builds - disable poweredByHeader - swap actions/cache for Blacksmith sticky disk on .next/cache
1 parent 6d4ffff commit bfd0f46

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

.github/workflows/test-build.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,11 @@ jobs:
4444
key: ${{ github.repository }}-turbo-cache
4545
path: ./.turbo
4646

47-
- name: Restore Next.js build cache
48-
uses: actions/cache@v5
47+
- name: Mount Next.js build cache (Sticky Disk)
48+
uses: useblacksmith/stickydisk@v1
4949
with:
50+
key: ${{ github.repository }}-nextjs-cache
5051
path: ./apps/sim/.next/cache
51-
key: ${{ runner.os }}-nextjs-${{ hashFiles('bun.lock') }}
52-
restore-keys: |
53-
${{ runner.os }}-nextjs-
5452

5553
- name: Install dependencies
5654
run: bun install --frozen-lockfile

apps/sim/next.config.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010

1111
const nextConfig: NextConfig = {
1212
devIndicators: false,
13+
poweredByHeader: false,
1314
images: {
1415
formats: ['image/avif', 'image/webp'],
1516
remotePatterns: [
@@ -75,9 +76,6 @@ const nextConfig: NextConfig = {
7576
ignoreBuildErrors: isTruthy(env.DOCKER_BUILD),
7677
},
7778
output: isTruthy(env.DOCKER_BUILD) ? 'standalone' : undefined,
78-
turbopack: {
79-
resolveExtensions: ['.tsx', '.ts', '.jsx', '.js', '.mjs', '.json'],
80-
},
8179
serverExternalPackages: [
8280
'@1password/sdk',
8381
'unpdf',
@@ -99,11 +97,9 @@ const nextConfig: NextConfig = {
9997
},
10098
experimental: {
10199
optimizeCss: true,
102-
turbopackSourceMaps: false,
103-
turbopackFileSystemCacheForDev: true,
104100
preloadEntriesOnStart: false,
101+
turbopackFileSystemCacheForBuild: true,
105102
optimizePackageImports: [
106-
'lucide-react',
107103
'lodash',
108104
'framer-motion',
109105
'reactflow',
@@ -119,7 +115,6 @@ const nextConfig: NextConfig = {
119115
'@radix-ui/react-slider',
120116
'streamdown',
121117
'zod',
122-
'date-fns',
123118
],
124119
},
125120
...(isDev && {

0 commit comments

Comments
 (0)