From 13785d8f39a8b5a540973f1ea9f7592d43cfcec2 Mon Sep 17 00:00:00 2001 From: Josh Story Date: Wed, 7 Aug 2024 17:28:05 -0700 Subject: [PATCH] Stop mangling server runtime in dev The server runtimes are currently all bundled in production mode with full optimizaitons. This can make certain things hard in dev mode because while most of your app will be unmangled anything that runs from the server runtime will be runnign without useful debug information like original function names. This PR updates the runtime configs to no longer mangle the output. --- packages/next/webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/next/webpack.config.js b/packages/next/webpack.config.js index 2c6ef37552c03..b18517ef8d3c6 100644 --- a/packages/next/webpack.config.js +++ b/packages/next/webpack.config.js @@ -173,6 +173,7 @@ module.exports = ({ dev, turbo, bundleType, experimental }) => { format: { preamble: '', }, + mangle: dev ? false : true, }, }), ],