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

[TOOL-3032] Next.js build memory optimizations #5938

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

MananTank
Copy link
Member

@MananTank MananTank commented Jan 13, 2025

  • Disable eslint as part of next.js build - We are already running eslint in separate pipeline
  • Enable Next.js memory optimization flags

PR-Codex overview

This PR introduces several enhancements and configurations for the next.config files across multiple applications, focusing on ESLint settings, source maps, and security headers. It also refines the handling of remote IPFS gateways and Sentry options.

Detailed summary

  • Added eslint configuration to ignore during builds in multiple next.config files.
  • Set productionBrowserSourceMaps to false.
  • Enabled experimental features: webpackBuildWorker, webpackMemoryOptimizations, and serverSourceMaps.
  • Updated security headers to use consistent key-value formatting.
  • Enhanced determineIpfsGateways function for better client ID handling.
  • Refined SENTRY_OPTIONS for better source map management and logging.
  • Updated the baseNextConfig structure to include new configurations and maintain existing functionalities.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

linear bot commented Jan 13, 2025

Copy link

changeset-bot bot commented Jan 13, 2025

⚠️ No Changeset found

Latest commit: ec15526

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2025 9:57am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2025 9:57am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2025 9:57am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2025 9:57am

@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. Playground Changes involving the Playground codebase. Portal Involves changes to the Portal (docs) codebase. Ecosystem Portal Involves changes to the Ecosystem Portal labels Jan 13, 2025
Copy link

graphite-app bot commented Jan 13, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@MananTank MananTank marked this pull request as ready for review January 13, 2025 15:24
@MananTank MananTank requested review from a team as code owners January 13, 2025 15:24
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@MananTank MananTank changed the title [TOOL-3032] Next.js build memory optimizations [TOOL-3032] Next.js build memory optimizations Jan 13, 2025
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.85%. Comparing base (0682f26) to head (d7f2249).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5938   +/-   ##
=======================================
  Coverage   54.85%   54.85%           
=======================================
  Files        1142     1142           
  Lines       60928    60928           
  Branches     5140     5140           
=======================================
  Hits        33424    33424           
  Misses      26777    26777           
  Partials      727      727           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 0682f26
packages 52.50% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Copy link
Contributor

github-actions bot commented Jan 13, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.65 KB (0%) 913 ms (0%) 317 ms (+292.35% 🔺) 1.3 s
thirdweb (cjs) 115.43 KB (0%) 2.4 s (0%) 337 ms (+47.21% 🔺) 2.7 s
thirdweb (minimal + tree-shaking) 5.59 KB (0%) 112 ms (0%) 73 ms (+1666.13% 🔺) 185 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 8 ms (+381.55% 🔺) 18 ms
thirdweb/react (minimal + tree-shaking) 19.21 KB (0%) 385 ms (0%) 70 ms (+301.01% 🔺) 454 ms

Copy link

graphite-app bot commented Jan 13, 2025

Merge activity

* Disable eslint as part of next.js build - We are already running eslint in separate pipeline
* Enable Next.js memory optimization flags

<!-- start pr-codex -->

---

## PR-Codex overview
This PR primarily focuses on enhancing the configuration of multiple `Next.js` applications by adding ESLint settings, production source maps, and experimental features. It also modifies security headers and refines the handling of IPFS gateways.

### Detailed summary
- Added `eslint` configuration with `ignoreDuringBuilds: true` to multiple `next.config` files.
- Set `productionBrowserSourceMaps` to `false`.
- Enabled experimental features: `webpackBuildWorker`, `webpackMemoryOptimizations`, and `serverSourceMaps`.
- Updated security headers in `apps/dashboard/next.config.ts` for consistent formatting.
- Refined `determineIpfsGateways` function for IPFS gateway handling.
- Maintained existing configurations for redirects, rewrites, images, and compiler settings.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard. Ecosystem Portal Involves changes to the Ecosystem Portal Playground Changes involving the Playground codebase. Portal Involves changes to the Portal (docs) codebase.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants