Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Disable nodeEnv optimization in Webpack #2970

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -255,6 +256,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -426,6 +428,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -597,6 +600,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -767,6 +771,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -938,6 +943,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -1109,6 +1115,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -1280,6 +1287,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -1459,6 +1467,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -1623,6 +1632,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -1794,6 +1804,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -1973,6 +1984,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -2152,6 +2164,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -2332,6 +2345,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -2503,6 +2517,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -2674,6 +2689,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -2854,6 +2870,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -3030,6 +3047,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -3187,6 +3205,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down Expand Up @@ -3344,6 +3363,7 @@ exports[`getDefaultConfiguration returns the default Webpack configuration for t
},
},
],
"nodeEnv": false,
},
"output": {
"chunkFormat": "commonjs",
Expand Down
6 changes: 6 additions & 0 deletions packages/snaps-cli/src/webpack/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
*/
Expand Down
Loading