diff --git a/src/dev/build/tasks/install_dependencies_task.ts b/src/dev/build/tasks/install_dependencies_task.ts index 89cbeff170527..7e04164dd0851 100644 --- a/src/dev/build/tasks/install_dependencies_task.ts +++ b/src/dev/build/tasks/install_dependencies_task.ts @@ -7,10 +7,13 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ +import { relative } from 'path'; + import type { Task } from '../lib'; import { exec } from '../lib'; const YARN_EXEC = process.env.npm_execpath || 'yarn'; +const NODE_EXEC = process.execPath || 'node'; export const InstallDependencies: Task = { description: 'Installing node_modules, including production builds of packages', @@ -35,5 +38,19 @@ export const InstallDependencies: Task = { cwd: build.resolvePath(), } ); + + await exec( + log, + NODE_EXEC, + [ + config.resolveFromRepo('node_modules/.bin/patch-package'), + '--error-on-fail', + '--patch-dir', + relative(build.resolvePath(), config.resolveFromRepo('patches')), + ], + { + cwd: build.resolvePath(), + } + ); }, };