Skip to content

Commit 81f8e69

Browse files
authored
feat: Optimize lambda size output (#11227)
1 parent 047be56 commit 81f8e69

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

next.config.js

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@ const {redirects} = require('./redirects.js');
33
const {codecovWebpackPlugin} = require('@codecov/webpack-plugin');
44
const {withSentryConfig} = require('@sentry/nextjs');
55

6+
const outputFileTracingExcludes = process.env.NEXT_PUBLIC_DEVELOPER_DOCS
7+
? {}
8+
: {
9+
'/**/*': [
10+
'./.git/**/*',
11+
'./apps/**/*',
12+
'develop-docs/**/*',
13+
'node_modules/@esbuild/darwin-arm64',
14+
],
15+
'/platform-redirect': [
16+
'docs/organization/integrations/**/*',
17+
'docs/product/**/*',
18+
'docs/concepts/**/*',
19+
'docs/api/**/*',
20+
'docs/pricing/**/*',
21+
'docs/account/**/*',
22+
'**/*.gif',
23+
'public/mdx-images/**/*',
24+
'*.pdf',
25+
],
26+
'\\[\\[\\.\\.\\.path\\]\\]': [
27+
'docs/**/*',
28+
'node_modules/prettier/plugins',
29+
'node_modules/rollup/dist',
30+
],
31+
'sitemap.xml': ['docs/**/*', 'public/mdx-images/**/*', '*.gif', '*.pdf', '*.png'],
32+
};
33+
634
/** @type {import('next').NextConfig} */
735
const nextConfig = {
836
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
@@ -11,9 +39,7 @@ const nextConfig = {
1139

1240
experimental: {
1341
serverComponentsExternalPackages: ['rehype-preset-minify'],
14-
outputFileTracingExcludes: {
15-
'/**/*': ['./.git/**/*', './apps/**/*'],
16-
},
42+
outputFileTracingExcludes,
1743
},
1844

1945
webpack: (config, _options) => {

0 commit comments

Comments
 (0)