mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
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
This commit is contained in:
@@ -44,13 +44,11 @@ jobs:
|
||||
key: ${{ github.repository }}-turbo-cache
|
||||
path: ./.turbo
|
||||
|
||||
- name: Restore Next.js build cache
|
||||
uses: actions/cache@v5
|
||||
- name: Mount Next.js build cache (Sticky Disk)
|
||||
uses: useblacksmith/stickydisk@v1
|
||||
with:
|
||||
key: ${{ github.repository }}-nextjs-cache
|
||||
path: ./apps/sim/.next/cache
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('bun.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nextjs-
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
devIndicators: false,
|
||||
poweredByHeader: false,
|
||||
images: {
|
||||
formats: ['image/avif', 'image/webp'],
|
||||
remotePatterns: [
|
||||
@@ -75,9 +76,6 @@ const nextConfig: NextConfig = {
|
||||
ignoreBuildErrors: isTruthy(env.DOCKER_BUILD),
|
||||
},
|
||||
output: isTruthy(env.DOCKER_BUILD) ? 'standalone' : undefined,
|
||||
turbopack: {
|
||||
resolveExtensions: ['.tsx', '.ts', '.jsx', '.js', '.mjs', '.json'],
|
||||
},
|
||||
serverExternalPackages: [
|
||||
'@1password/sdk',
|
||||
'unpdf',
|
||||
@@ -99,11 +97,9 @@ const nextConfig: NextConfig = {
|
||||
},
|
||||
experimental: {
|
||||
optimizeCss: true,
|
||||
turbopackSourceMaps: false,
|
||||
turbopackFileSystemCacheForDev: true,
|
||||
preloadEntriesOnStart: false,
|
||||
turbopackFileSystemCacheForBuild: true,
|
||||
optimizePackageImports: [
|
||||
'lucide-react',
|
||||
'lodash',
|
||||
'framer-motion',
|
||||
'reactflow',
|
||||
@@ -119,7 +115,6 @@ const nextConfig: NextConfig = {
|
||||
'@radix-ui/react-slider',
|
||||
'streamdown',
|
||||
'zod',
|
||||
'date-fns',
|
||||
],
|
||||
},
|
||||
...(isDev && {
|
||||
|
||||
Reference in New Issue
Block a user