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

(frontend)[AGE-1415]: Enable bundle size analyzer plugin #2341

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion agenta-web/.env.local.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Rename this file to .env.local and provide the secret values to access them in the app
# .env.local should not be committed to git

NEXT_PUBLIC_OPENAI_API_KEY=
NEXT_PUBLIC_OPENAI_API_KEY=

# this is a flag to enable bundle analyzer in the build process
ANALYZE=
6 changes: 5 additions & 1 deletion agenta-web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const withMDX = require("@next/mdx")({
},
})

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

/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
Expand Down Expand Up @@ -61,4 +65,4 @@ const nextConfig = {
},
}

module.exports = withMDX(nextConfig)
module.exports = withBundleAnalyzer(withMDX(nextConfig))
Loading
Loading