Disable minification during builds in Next 15
Answered
West African Lion posted this in #help-forum
West African LionOP
Currently running into an issue where I'm getting an Application Error, but only when building and deployed to prod/stage in our project. This wouldn't be a problem, but nobody can replicate the error in dev with
There used to be a way to disable minification by putting
Is there any way to disable minification in Next 15? Or does anyone have any suggestions on how to debug this issue?
Thanks!
npm run dev
or by building and doing npm run start
. So we just have this nebulous minified error in prod/stage. It's https://react.dev/errors/185, but of course we get no real details.There used to be a way to disable minification by putting
swcMinify: false
in next.config.mjs, but it seems like this was disabled in Next 15 for some reason. I've tries using swcrc.json to disable minificaiton, but this didn't work. I'm not sure Next reads from here for swc. I've been searching high and low for a solution, but I can't seem to find a way to disable minification to figure out what this error is.Is there any way to disable minification in Next 15? Or does anyone have any suggestions on how to debug this issue?
Thanks!
7 Replies
American black bear
You cannot do that as of next.js 15
but I doubt it's what's causing your bug
West African LionOP
You're correct, its not causing the bug.
But the bug only appears in the built version of the app. I'd like to disable minification in my build so I can get more detailed error information instead of a minification error.
But the bug only appears in the built version of the app. I'd like to disable minification in my build so I can get more detailed error information instead of a minification error.
American black bear
can you describe the bug
West African LionOP
Resolved, had to update Next and React
Answer