1
0
mirror of synced 2025-12-19 09:57:42 -05:00

add turbopack resolveAlias fs fallback for nextjs 16 (#58390)

This commit is contained in:
Robert Sese
2025-11-06 13:24:24 -06:00
committed by GitHub
parent 5316456b87
commit 568bbc5166
2 changed files with 16 additions and 1 deletions

View File

@@ -47,9 +47,21 @@ const config: NextConfig = {
}
})
},
// Turbopack is the default bundler in Next.js 16
// Keep webpack config for now to support both bundlers
turbopack: {},
// Turbopack configuration for Next.js 16 (replaces webpack fallbacks)
turbopack: {
resolveAlias: {
fs: {
browser: './empty.ts', // Point to empty module when fs is requested for browser
},
async_hooks: {
browser: './empty.ts', // Point to empty module when async_hooks is requested for browser
},
},
},
webpack: (webpackConfig) => {
webpackConfig.experiments = webpackConfig.experiments || {}