Skip to content

Commit

Permalink
add MANGLING_DEBUG option
Browse files Browse the repository at this point in the history
  • Loading branch information
feedthejim committed Sep 27, 2022
1 parent c86a9b9 commit 2537fdb
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion packages/next/build/webpack-config.ts
Expand Up @@ -902,13 +902,28 @@ export default async function getBaseWebpackConfig(
comparisons: false,
inline: 2, // https://github.com/vercel/next.js/issues/7178#issuecomment-493048965
},
mangle: { safari10: true },
mangle: {
safari10: true,
...(process.env.MANGLING_DEBUG
? {
toplevel: true,
module: true,
keep_classnames: true,
keep_fnames: true,
}
: {}),
},
output: {
ecma: 5,
safari10: true,
comments: false,
// Fixes usage of Emoji and certain Regex
ascii_only: true,
...(process.env.MANGLING_DEBUG
? {
beautify: true,
}
: {}),
},
}

Expand Down

0 comments on commit 2537fdb

Please sign in to comment.