Skip to content

nextjs build - very high heap usage - Peak heap usage: 1806.94 MB #348

@schtiewen

Description

@schtiewen

Steps to reproduce

hi,
i've a nextjs 15.1.0 app and i'm using the withPigment function.

const pigmentConfig: PigmentOptions = {
    transformLibraries: ['@mui/material'],
    theme
};

export default withNextIntl(withPigment(nextConfig, pigmentConfig));

Current behavior

the problem is, that by the build, the process needs round about 2GB.
for testing purpose, i've removed the "transformLibraries: ['@mui/material']" and the output was round about 600MB.

Expected behavior

the build process should not take up too much memory

Context

No response

Your environment

  System:
    OS: macOS 14.7.1
  Binaries:
    Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 131.0.6778.109
    Edge: Not Found
    Safari: 18.1
  npmPackages:
    @emotion/react:  11.13.3 
    @emotion/styled:  11.13.0 
    @mui/core-downloads-tracker:  6.2.0 
    @mui/material: ^6.2.0 => 6.2.0 
    @mui/material-nextjs: ^6.2.0 => 6.2.0 
    @mui/material-pigment-css: ^6.2.0 => 6.2.0 
    @mui/private-theming:  6.2.0 
    @mui/styled-engine:  6.2.0 
    @mui/system:  6.2.0 
    @mui/types:  7.2.19 
    @mui/utils:  6.2.0 
    @pigment-css/nextjs-plugin: ^0.0.28 => 0.0.28 
    @pigment-css/react:  0.0.28 
    @pigment-css/unplugin:  0.0.28 
    @types/react: ^18 => 18.3.12 
    react: ^18 => 18.3.1 
    react-dom: ^18 => 18.3.1 
    typescript: ^5 => 5.6.3 

Search keywords: memory peak heap

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions