Fix qa-frontend-node:latest CI build
Due to changes in node v17+ to work with OpenSSL v3.0, MD4/MD5 hash algorithms no longer can be used out-of-the-box with Webpack (https://github.com/webpack/webpack/issues/14532). We can't switch to another hash algorithm like SHA256 until we upgrade to Webpack v5 (https://gitlab.com/gitlab-org/gitlab/-/issues/350120), but we can make the latest node version work by specifying `--openssl-legacy-provider` in `NODE_OPTIONS`. We use a separate build script (`webpack-prod-node-latest`) because older versions of node will fail if `--openssl-legacy-provider` is used. Closes https://gitlab.com/gitlab-org/gitlab/-/issues/346110
Showing
... | ... | @@ -44,7 +44,8 @@ |
"stylelint-create-utility-map": "node scripts/frontend/stylelint/stylelint-utility-map.js", | ||
"webpack": "NODE_OPTIONS=\"--max-old-space-size=3584\" webpack --config config/webpack.config.js", | ||
"webpack-vendor": "NODE_OPTIONS=\"--max-old-space-size=3584\" webpack --config config/webpack.vendor.config.js", | ||
"webpack-prod": "NODE_OPTIONS=\"--max-old-space-size=3584\" NODE_ENV=production webpack --config config/webpack.config.js" | ||
"webpack-prod": "NODE_OPTIONS=\"--max-old-space-size=3584\" NODE_ENV=production webpack --config config/webpack.config.js", | ||
"webpack-prod-node-latest": "NODE_OPTIONS=\"--max-old-space-size=3584 --openssl-legacy-provider\" NODE_ENV=production webpack --config config/webpack.config.js" | ||
}, | ||
"dependencies": { | ||
"@babel/core": "^7.10.1", | ||
... | ... |
Please register or sign in to comment