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

Commit 63caa9d

Browse files
author
Wenjie Xia
committed
refactor(server): clean up
1 parent ffe5545 commit 63caa9d

File tree

6 files changed

+134
-116
lines changed

6 files changed

+134
-116
lines changed

framework/core/hmr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const { location } = window as any
5050
const { protocol, host } = location
5151
const modules: Map<string, Module> = new Map()
5252
const messageQueue: any[] = []
53-
const socket = new WebSocket((protocol === 'https:' ? 'wss' : 'ws') + '://' + host + '/_hmr', /* 'aleph-hmr' */)
53+
const socket = new WebSocket((protocol === 'https:' ? 'wss' : 'ws') + '://' + host + '/_hmr')
5454

5555
socket.addEventListener('open', () => {
5656
messageQueue.forEach(msg => socket.send(JSON.stringify(msg)))

framework/core/routing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { reModuleExt } from '../../shared/constants.ts'
22
import util from '../../shared/util.ts'
3-
import type { DependencyDescriptor, RouterURL } from '../../types.ts'
3+
import type { RouterURL } from '../../types.ts'
44
import events from './events.ts'
55

66
export interface Route {
@@ -12,7 +12,7 @@ export interface Route {
1212
export interface RouteModule {
1313
readonly url: string
1414
readonly hash: string
15-
readonly deps?: DependencyDescriptor[]
15+
readonly asyncDeps?: { data?: boolean, style?: boolean }
1616
}
1717

1818
const ghostRoute: Route = { path: '', module: { url: '', hash: '' } }

0 commit comments

Comments
 (0)