Skip to content

Commit

Permalink
Fix issue where ASAP would blow up treeshaking due to malformed file …
Browse files Browse the repository at this point in the history
…path
  • Loading branch information
ryanblock committed Jul 26, 2024
1 parent 583f86a commit cc6b474
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/hydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit cc6b474

Please sign in to comment.