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

Commit ed52652

Browse files
committed
fix: fix api modules missing import maps
1 parent a9a328c commit ed52652

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

server/app.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,7 @@ export class Application implements ServerApplication {
208208
if (existsDirSync(apiDir)) {
209209
for await (const { path: p } of walk(apiDir, { ...walkOptions, exts: moduleExts })) {
210210
const url = util.cleanPath('/api/' + util.trimPrefix(p, apiDir))
211-
if (this.isDev) {
212-
// in dev mode, we pre-compile the api code to support re-import the api module
213-
// when it is changed.
214-
await this.compile(url)
215-
} else {
216-
this.#modules.set(url, { url, deps: [], sourceHash: '', hash: '', jsFile: p })
217-
}
211+
await this.compile(url)
218212
this.#apiRouting.update(this.createRouteModule(url))
219213
}
220214
}

0 commit comments

Comments
 (0)