From 9defcefe1e31104ff17976e5adf91ef21bdae102 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 18 Jan 2023 16:41:24 -0600 Subject: [PATCH] [build] Fix canvas shareable runtime (#149165) The canvas shareable runtime build uses webpack 4, which needs the `--legacy-openssl-provider` flag after the recent Node 16 -> 18 upgrade. Context: the runtime build is disabled by default in pull requests because it's currently untested and adds ~3 minutes to build time. It is enabled in our nightly snapshots pipeline, which we've been using as a slower feedback loop for build issues. ## Testing ``` node x-pack/plugins/canvas/scripts/shareable_runtime.js ``` should exit 0 --- x-pack/plugins/canvas/scripts/shareable_runtime.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x-pack/plugins/canvas/scripts/shareable_runtime.js b/x-pack/plugins/canvas/scripts/shareable_runtime.js index a0b8421f8da01..f3e1e66c1744a 100644 --- a/x-pack/plugins/canvas/scripts/shareable_runtime.js +++ b/x-pack/plugins/canvas/scripts/shareable_runtime.js @@ -55,6 +55,7 @@ run( execa.sync( process.execPath, [ + '--openssl-legacy-provider', require.resolve('webpack-dev-server/bin/webpack-dev-server'), '--config', webpackConfig, @@ -88,6 +89,7 @@ run( execa.sync( process.execPath, [ + '--openssl-legacy-provider', require.resolve('webpack/bin/webpack'), '--config', webpackConfig,