From 4e7be57b379045789c0a2c5f5acb3165a1ffb2c8 Mon Sep 17 00:00:00 2001 From: smouillour Date: Thu, 12 Oct 2023 17:54:36 +0200 Subject: [PATCH] change way to call webpack in build-lib-umd --- tools/scripts-core/src/scripts/build-lib-umd.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/scripts-core/src/scripts/build-lib-umd.js b/tools/scripts-core/src/scripts/build-lib-umd.js index c717813d89..ac29be0bc6 100644 --- a/tools/scripts-core/src/scripts/build-lib-umd.js +++ b/tools/scripts-core/src/scripts/build-lib-umd.js @@ -2,12 +2,11 @@ import fs from 'fs'; import * as utils from '@talend/scripts-utils'; import { getUserConfigFile } from '../utils/env.js'; -const webpack = utils.path.resolveBin('webpack'); const dirname = utils.path.getDirName(import.meta.url); async function buildUMD(env, presetApi, options = []) { return utils.process.spawn( - webpack, + new URL(import.meta.resolve('webpack/bin/webpack.js')).pathname, ['--config', utils.path.hereRelative(dirname, '../config/webpack.config.js')].concat(options), { stdio: 'inherit', env }, );