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); +};