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

clean up Next.js config (#58556)

This commit is contained in:
Evan Bonsignori
2025-12-01 07:26:08 -08:00
committed by GitHub
parent 30c3938574
commit 4936053007

View File

@@ -37,7 +37,7 @@ const config: NextConfig = {
},
// Don't use automatic Next.js logging in dev unless the log level is `debug` or higher
// See `src/observability/logger/README.md` for log levels
logging: getLogLevelNumber() < 3 ? false : {},
logging: getLogLevelNumber() < 3 ? undefined : {},
async rewrites() {
const DEFAULT_VERSION = 'free-pro-team@latest'
return productIds.map((productId) => {
@@ -48,6 +48,11 @@ const config: NextConfig = {
})
},
webpack: (webpackConfig) => {
webpackConfig.resolve.fallback = { fs: false, async_hooks: false }
return webpackConfig
},
// Turbopack is the default bundler in Next.js 16
// Keep webpack config for now to support both bundlers
@@ -63,13 +68,6 @@ const config: NextConfig = {
},
},
webpack: (webpackConfig) => {
webpackConfig.experiments = webpackConfig.experiments || {}
webpackConfig.experiments.topLevelAwait = true
webpackConfig.resolve.fallback = { fs: false, async_hooks: false }
return webpackConfig
},
// https://nextjs.org/docs/api-reference/next.config.js/compression
compress: false,
@@ -79,18 +77,6 @@ const config: NextConfig = {
// the CDN marks the cached content as "fresh".
generateEtags: false,
experimental: {
// The output of our getServerSideProps() return large chunks of
// data because it contains our rendered Markdown.
// The default, for a "Large Page Data" warning is 128KB
// but many of our pages are much larger.
// The warning is: https://nextjs.org/docs/messages/large-page-data
largePageDataBytes: 1024 * 1024, // 1 MB
// This makes it so that going Back will scroll to the previous position
scrollRestoration: true,
},
compiler: {
styledComponents: true,
},