Skip to content

Commit 97a92fa

Browse files
authored
fix: sort all shared items to create deterministic builds when hashes are used (#333)
1 parent 68672d1 commit 97a92fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/virtualModules/virtualRemoteEntry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export function generateLocalSharedImportMap() {
4040
return `
4141
const importMap = {
4242
${Array.from(getUsedShares())
43+
.sort()
4344
.map(
4445
(pkg) => `
4546
${JSON.stringify(pkg)}: async () => {
@@ -52,6 +53,7 @@ export function generateLocalSharedImportMap() {
5253
}
5354
const usedShared = {
5455
${Array.from(getUsedShares())
56+
.sort()
5557
.map((key) => {
5658
const shareItem = getNormalizeShareItem(key);
5759
if (!shareItem) return null;

0 commit comments

Comments
 (0)