Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahabhgk committed Apr 29, 2024
1 parent 8d70aeb commit e3ba82e
Showing 1 changed file with 8 additions and 20 deletions.
28 changes: 8 additions & 20 deletions packages/rspack/src/config/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,26 +191,14 @@ const applySnapshotDefaults = (
snapshot: SnapshotOptions,
{ production }: { production: boolean }
) => {
if (typeof snapshot.module === "object") {
D(snapshot.module, "timestamp", false);
D(snapshot.module, "hash", false);
} else {
F(snapshot, "module", () =>
production
? { timestamp: true, hash: true }
: { timestamp: true, hash: false }
);
}
if (typeof snapshot.resolve === "object") {
D(snapshot.resolve, "timestamp", false);
D(snapshot.resolve, "hash", false);
} else {
F(snapshot, "resolve", () =>
production
? { timestamp: true, hash: true }
: { timestamp: true, hash: false }
);
}
D(snapshot, "module", {});
assertNotNill(snapshot.module);
D(snapshot.module, "timestamp", true);
D(snapshot.module, "hash", production);
D(snapshot, "resolve", {});
assertNotNill(snapshot.resolve);
D(snapshot.resolve, "timestamp", true);
D(snapshot.resolve, "hash", production);
};

const applyJavascriptParserOptionsDefaults = (
Expand Down

0 comments on commit e3ba82e

Please sign in to comment.