Skip to content

Commit

Permalink
add bundle-analyzer
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Alvarez <j@jonalvarezz.com>
  • Loading branch information
jonalvarezz committed Dec 12, 2024
1 parent 3f01335 commit 5315b22
Show file tree
Hide file tree
Showing 4 changed files with 2,657 additions and 4,611 deletions.
3 changes: 3 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ LAUNCHDARKLY_SDK_KEY=

# Sentry. Leave empty to disable
SENTRY_DSN=

# Bundle analyzer
BUNDLE_ANALYZE="true"
10 changes: 8 additions & 2 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import { withSentryConfig } from "@sentry/nextjs"
import bunbleAnalyzer from "@next/bundle-analyzer"

import type { NextConfig } from "next"

const enableSentry = Boolean(process.env.SENTRY_DSN)

const nextConfig: NextConfig = {
const withBundleAnalyzer = bunbleAnalyzer({
enabled: process.env.BUNDLE_ANALYZE === "true",
})

const nextConfig: NextConfig = withBundleAnalyzer({
/* config options here */
}
})

const getSentryConfig = () =>
withSentryConfig(nextConfig, {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@formatjs/intl-localematcher": "^0.5.8",
"@heroicons/react": "^2.2.0",
"@launchdarkly/node-server-sdk": "^9.7.2",
"@next/bundle-analyzer": "^15.1.0",
"@sentry/nextjs": "^8",
"@tanstack/react-query": "^5.62.2",
"@types/negotiator": "^0.6.3",
Expand Down
Loading

0 comments on commit 5315b22

Please sign in to comment.