Skip to content

Commit

Permalink
Remove old-space-size filtering from dev server (#49727)
Browse files Browse the repository at this point in the history
We shouldn't filter this from the router worker as this is where the dev
server runs and should be able to allocate more memory.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04MEB9L9RQ/p1683823794069839?thread_ts=1683756338.246099&cid=C04MEB9L9RQ)
  • Loading branch information
ijjk committed May 13, 2023
1 parent 68b5141 commit c3f54ec
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/next/src/server/lib/start-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,7 @@ export async function startServer({
env: {
FORCE_COLOR: '1',
...((initialEnv || process.env) as typeof process.env),
// we don't pass down NODE_OPTIONS as it can
// extra memory usage
NODE_OPTIONS: getNodeOptionsWithoutInspect()
.replace(/--max-old-space-size=[\d]{1,}/, '')
.trim(),
NODE_OPTIONS: getNodeOptionsWithoutInspect().trim(),
},
},
exposedMethods: ['initialize'],
Expand Down

0 comments on commit c3f54ec

Please sign in to comment.