Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 06-bundle-analyzer.mdx #64740

Merged
merged 4 commits into from
Apr 19, 2024
Merged
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ pnpm add @next/bundle-analyzer
Then, add the bundle analyzer's settings to your `next.config.js`.

```js filename="next.config.js"
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})

/** @type {import('next').NextConfig} */
const nextConfig = {}

module.exports = withBundleAnalyzer(nextConfig)
const withBundleAnalyzer = require('@next/bundle-analyzer')()
ijjk marked this conversation as resolved.
Show resolved Hide resolved

module.exports = process.env.ANALYZE === 'true' ? withBundleAnalyzer(nextConfig) : nextConfig
```

## Analyzing your bundles
Expand Down
Loading