diff --git a/packages/snaps-cli/src/webpack/config.ts b/packages/snaps-cli/src/webpack/config.ts index 8ea7fe2f43..8fd69173ca 100644 --- a/packages/snaps-cli/src/webpack/config.ts +++ b/packages/snaps-cli/src/webpack/config.ts @@ -373,6 +373,12 @@ export async function getDefaultConfiguration( optimization: { minimize: config.output.minimize, + /** + * We disable the nodeEnv optimization as we already add process.NODE_ENV + * via the DefinePlugin in the section above this. + */ + nodeEnv: false, + /** * The minimizer to use. We set it to use the `TerserPlugin`. */