From a85b86fdf60c0e32b0539dde5b1d10175216bdfa Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Wed, 14 Oct 2020 13:45:17 +0200 Subject: [PATCH] Use both --output-path and --output-filename --- scripts/run-module-bundlers-smoketests.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/run-module-bundlers-smoketests.js b/scripts/run-module-bundlers-smoketests.js index 54915447..94a3a549 100755 --- a/scripts/run-module-bundlers-smoketests.js +++ b/scripts/run-module-bundlers-smoketests.js @@ -8,7 +8,10 @@ Test webextension-polyfill bundled with webpack ===============================================`); process.env.TEST_BUNDLED_POLYFILL = "/tmp/webpack-bundle.js"; -result = shell.exec(`webpack --mode production --entry ./test/fixtures/bundle-entrypoint.js --output-filename ${process.env.TEST_BUNDLED_POLYFILL}`).code || +const webpackOutputDir = process.env.TEST_BUNDLED_POLYFILL.replace(/\/[^/]+$/, ""); +const webpackOutputFilename = process.env.TEST_BUNDLED_POLYFILL.replace(/^.*\//, ""); + +result = shell.exec(`webpack --mode production --entry ./test/fixtures/bundle-entrypoint.js --output-path ${webpackOutputDir} --output-filename ${webpackOutputFilename}`).code || shell.exec("npm run test").code || result; console.log(`