From cc6b474b29cd6bc0d05d52ff8429f017f2a2c8e0 Mon Sep 17 00:00:00 2001 From: Ryan Block Date: Thu, 25 Jul 2024 20:26:19 -0700 Subject: [PATCH] Fix issue where ASAP would blow up treeshaking due to malformed file path --- src/hydrate.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hydrate.js b/src/hydrate.js index bdc89e8..da51fd0 100644 --- a/src/hydrate.js +++ b/src/hydrate.js @@ -155,7 +155,10 @@ function hydrator (inventory, installing, params, callback) { let result = actions.autoinstall({ dirs: srcDirsWithoutManifests, update, ...params, inventory }) if (result.length) { autoinstalled = result - let install = autoinstalled.map(({ dir, file }) => stripCwd(join(dir, file), cwd)) + let install = autoinstalled.map(({ dir, file }) => hasASAP?.src === dir + // At this point, ASAP has been given a package.json, and should just be run as an absolute path + ? join(dir, file) + : stripCwd(join(dir, file), cwd)) manifests = manifests.concat(install) } }