Skip to content

Commit

Permalink
chore: apply automated updates
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Sep 25, 2024
1 parent 499e7bb commit a6edc8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/server/_resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ import { join, relative } from "pathe";
export async function createResolver() {
const { createJiti } = await import("jiti");

const jiti = createJiti(join(process.cwd(), '_'), {
const jiti = createJiti(join(process.cwd(), "_"), {
cache: true,
requireCache: false,
interopDefault: true,
});


return {
relative: (path: string) => relative(process.cwd(), path),
formatRelative: (path: string) => `\`./${relative(process.cwd(), path)}\``,
Expand Down
2 changes: 1 addition & 1 deletion src/server/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export async function createDevServer(
);
}

const _loadedEntry = await resolver.import(_entry) as any;
const _loadedEntry = (await resolver.import(_entry)) as any;

let _handler =
_loadedEntry.handler ||
Expand Down
4 changes: 1 addition & 3 deletions src/server/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ export async function listenAndWatch(
return;
}
const eventsString = filteredEvents
.map(
(e) => `${devServer.resolver.formatRelative(e.path)} ${e.type}d`,
)
.map((e) => `${devServer.resolver.formatRelative(e.path)} ${e.type}d`)
.join(", ");
logger.log(`🔄 Reloading server (${eventsString})`);
devServer.reload();
Expand Down

0 comments on commit a6edc8f

Please sign in to comment.