From 1441fc20dcbe601e6b4a1bdcac302e8854b19058 Mon Sep 17 00:00:00 2001 From: Pascal Jufer Date: Thu, 26 Dec 2024 17:02:55 +0100 Subject: [PATCH] Commit missing file --- bin/build/worker.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 bin/build/worker.js diff --git a/bin/build/worker.js b/bin/build/worker.js new file mode 100644 index 00000000..aaf1f8c0 --- /dev/null +++ b/bin/build/worker.js @@ -0,0 +1,14 @@ +import path from 'node:path'; + +export default async ({ targetName, config, targetConfig }) => { + const { default: task } = await import( + `./targets/${targetConfig.target || targetName}/index.js` + ); + + targetConfig.path = path.join( + config.global.rootDir, + ...targetConfig.path.split(path.posix.sep), + ); + + return task(config, targetConfig); +};