Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit cd05a22

Browse files
committed
Fix esbuild hash path issue
1 parent 0876ea4 commit cd05a22

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

bundler/mod.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ export class Bundler {
129129
}
130130

131131
private async compile(mod: Module, external: string[]): Promise<string> {
132-
const hash = mod.deps.length > 0 ? computeHash(mod.sourceHash + mod.deps.map(({ hash }) => hash).join('')) : mod.sourceHash
133-
const bundlingFile = util.trimSuffix(mod.jsFile, '.js') + `.bundling.${hash.slice(0, hashShort)}.js`
132+
const bundlingFile = util.trimSuffix(mod.jsFile, '.js') + '.bundling.js'
134133

135134
if (existsFileSync(bundlingFile)) {
136135
return bundlingFile
@@ -181,7 +180,6 @@ export class Bundler {
181180
}
182181
}
183182

184-
await clearBuildCache(bundlingFile)
185183
await ensureTextFile(bundlingFile, code)
186184

187185
return bundlingFile

server/app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,7 @@ export class Application implements ServerApplication {
11741174
}
11751175

11761176
if (fsync) {
1177+
await Deno.remove(util.trimSuffix(mod.jsFile, '.js') + '.bundling.js')
11771178
await Promise.all([
11781179
ensureTextFile(metaFile, JSON.stringify({
11791180
url,

0 commit comments

Comments
 (0)