Skip to content

Commit

Permalink
Merge pull request #2341 from Agenta-AI/AGE-1415/enhance-enable-bundl…
Browse files Browse the repository at this point in the history
…e-size-analyzer-plugin

(frontend)[AGE-1415]: Enable bundle size analyzer plugin
  • Loading branch information
mmabrouk authored Dec 9, 2024
2 parents 3bc24a6 + 0cf1d31 commit d7c4e91
Show file tree
Hide file tree
Showing 4 changed files with 307 additions and 2 deletions.
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

0 comments on commit d7c4e91

Please sign in to comment.