Skip to content

Commit cc6b474

Browse files
committed
Fix issue where ASAP would blow up treeshaking due to malformed file path
1 parent 583f86a commit cc6b474

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/hydrate.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ function hydrator (inventory, installing, params, callback) {
155155
let result = actions.autoinstall({ dirs: srcDirsWithoutManifests, update, ...params, inventory })
156156
if (result.length) {
157157
autoinstalled = result
158-
let install = autoinstalled.map(({ dir, file }) => stripCwd(join(dir, file), cwd))
158+
let install = autoinstalled.map(({ dir, file }) => hasASAP?.src === dir
159+
// At this point, ASAP has been given a package.json, and should just be run as an absolute path
160+
? join(dir, file)
161+
: stripCwd(join(dir, file), cwd))
159162
manifests = manifests.concat(install)
160163
}
161164
}

0 commit comments

Comments
 (0)