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

Commit cdaafca

Browse files
author
Je
committed
refactor: add version for import from url startsWith 'https://deno.land/x/aleph/'
1 parent 391a401 commit cdaafca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

project.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,15 +451,15 @@ export default class Project {
451451
await this._compile('/pages' + rp)
452452
}
453453

454-
const preCompileUrls = [
454+
const precompileUrls = [
455455
'https://deno.land/x/aleph/bootstrap.ts',
456456
'https://deno.land/x/aleph/renderer.ts',
457457
'https://deno.land/x/aleph/vendor/tslib/tslib.js',
458458
]
459459
if (this.isDev) {
460-
preCompileUrls.push('https://deno.land/x/aleph/hmr.ts')
460+
precompileUrls.push('https://deno.land/x/aleph/hmr.ts')
461461
}
462-
for (const url of preCompileUrls) {
462+
for (const url of precompileUrls) {
463463
await this._compile(url)
464464
}
465465
await this._createMainModule()
@@ -762,6 +762,8 @@ export default class Project {
762762
u.searchParams.set('dev', '')
763763
}
764764
dlUrl = u.toString().replace(/=(&|$)/, '$1')
765+
} else if (dlUrl.startsWith('https://deno.land/x/aleph/')) {
766+
dlUrl = `https://deno.land/x/aleph@v${version}/` + util.trimPrefix(dlUrl, 'https://deno.land/x/aleph/')
765767
}
766768
if (mod.sourceHash === '') {
767769
log.info('Download', url, dlUrl != url ? colors.dim(`• ${dlUrl}`) : '')

0 commit comments

Comments
 (0)