Skip to content

Commit

Permalink
Fix local bundles being created again and again leading to excessive …
Browse files Browse the repository at this point in the history
…disk usage
  • Loading branch information
salmenf committed Jul 18, 2024
1 parent 3de7617 commit d8144ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion @webwriter/core/model/stores/packagestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ export class PackageStore {

/** Create a hash value to identify a bundle. The hash is deterministically computed from the packages' names and versions. This allows for caching of existing bundles. */
static computeBundleHash(importIDs: string[], production=false) {
const bundleID = this.computeBundleID(importIDs, production)
const ids = importIDs.map(id => id.replace(/-local\d+/, "-local"))
const bundleID = this.computeBundleID(ids, production)
return hashCode(bundleID).toString(36)
}

Expand Down

0 comments on commit d8144ee

Please sign in to comment.