Skip to content

Commit 4936053

Browse files
authored
clean up Next.js config (#58556)
1 parent 30c3938 commit 4936053

File tree

1 file changed

+6
-20
lines changed

1 file changed

+6
-20
lines changed

next.config.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const config: NextConfig = {
3737
},
3838
// Don't use automatic Next.js logging in dev unless the log level is `debug` or higher
3939
// See `src/observability/logger/README.md` for log levels
40-
logging: getLogLevelNumber() < 3 ? false : {},
40+
logging: getLogLevelNumber() < 3 ? undefined : {},
4141
async rewrites() {
4242
const DEFAULT_VERSION = 'free-pro-team@latest'
4343
return productIds.map((productId) => {
@@ -48,6 +48,11 @@ const config: NextConfig = {
4848
})
4949
},
5050

51+
webpack: (webpackConfig) => {
52+
webpackConfig.resolve.fallback = { fs: false, async_hooks: false }
53+
return webpackConfig
54+
},
55+
5156
// Turbopack is the default bundler in Next.js 16
5257
// Keep webpack config for now to support both bundlers
5358

@@ -63,13 +68,6 @@ const config: NextConfig = {
6368
},
6469
},
6570

66-
webpack: (webpackConfig) => {
67-
webpackConfig.experiments = webpackConfig.experiments || {}
68-
webpackConfig.experiments.topLevelAwait = true
69-
webpackConfig.resolve.fallback = { fs: false, async_hooks: false }
70-
return webpackConfig
71-
},
72-
7371
// https://nextjs.org/docs/api-reference/next.config.js/compression
7472
compress: false,
7573

@@ -79,18 +77,6 @@ const config: NextConfig = {
7977
// the CDN marks the cached content as "fresh".
8078
generateEtags: false,
8179

82-
experimental: {
83-
// The output of our getServerSideProps() return large chunks of
84-
// data because it contains our rendered Markdown.
85-
// The default, for a "Large Page Data" warning is 128KB
86-
// but many of our pages are much larger.
87-
// The warning is: https://nextjs.org/docs/messages/large-page-data
88-
largePageDataBytes: 1024 * 1024, // 1 MB
89-
90-
// This makes it so that going Back will scroll to the previous position
91-
scrollRestoration: true,
92-
},
93-
9480
compiler: {
9581
styledComponents: true,
9682
},

0 commit comments

Comments
 (0)