Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"fumadocs-mdx": "^11.5.6",
"fumadocs-ui": "^15.0.16",
"lucide-react": "^0.511.0",
"next": "^15.2.3",
"next": "^15.3.2",
"next-themes": "^0.4.6",
"react": "19.1.0",
"react-dom": "19.1.0",
Expand Down
41 changes: 11 additions & 30 deletions apps/sim/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const nextConfig: NextConfig = {
},
experimental: {
optimizeCss: true,
turbopackSourceMaps: false,
},
...(env.NODE_ENV === 'development' && {
allowedDevOrigins: [
Expand All @@ -41,36 +42,6 @@ const nextConfig: NextConfig = {
],
outputFileTracingRoot: path.join(__dirname, '../../'),
}),
webpack: (config, { isServer, dev }) => {
// Skip webpack configuration in development when using Turbopack
if (dev && env.NEXT_RUNTIME === 'turbopack') {
return config
}

// Configure webpack to use filesystem cache for faster incremental builds
if (config.cache) {
config.cache = {
type: 'filesystem',
buildDependencies: {
config: [__filename],
},
cacheDirectory: path.resolve(process.cwd(), '.next/cache/webpack'),
}
}

// Avoid aliasing React on the server/edge runtime builds because it bypasses
// the "react-server" export condition, which Next.js relies on when
// bundling React Server Components and API route handlers.
if (!isServer) {
config.resolve.alias = {
...config.resolve.alias,
react: path.join(__dirname, '../../node_modules/react'),
'react-dom': path.join(__dirname, '../../node_modules/react-dom'),
}
}

return config
},
transpilePackages: ['prettier', '@react-email/components', '@react-email/render'],
async headers() {
return [
Expand Down Expand Up @@ -144,6 +115,16 @@ const nextConfig: NextConfig = {
},
],
},
// Block access to sourcemap files (defense in depth)
{
source: '/(.*)\\.map$',
headers: [
{
key: 'x-robots-tag',
value: 'noindex',
},
],
},
// Apply security headers to all routes
{
source: '/:path*',
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dev:classic": "next dev",
"dev:sockets": "bun run socket-server/index.ts",
"dev:full": "concurrently -n \"NextJS,Realtime\" -c \"cyan,magenta\" \"bun run dev\" \"bun run dev:sockets\"",
"build": "next build",
"build": "next build --turbopack",
"start": "next start",
"prepare": "cd ../.. && bun husky",
"db:push": "bunx drizzle-kit push",
Expand Down
36 changes: 18 additions & 18 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.