Skip to content

Commit ee667f4

Browse files
authored
fix(core): fix devtools asset routing under /__devtools (#353)
1 parent bb65e4b commit ee667f4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/core/src/node/cli-commands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import {
44
DEVTOOLS_MOUNT_PATH,
5+
DEVTOOLS_MOUNT_PATH_NO_TRAILING_SLASH,
56
} from '@vitejs/devtools-kit/constants'
67
import { normalizeHttpServerUrl } from 'devframe/node'
78
import { colors as c } from 'devframe/utils/colors'
@@ -51,7 +52,7 @@ export async function start(options: StartOptions) {
5152
for (const { baseUrl, distDir } of devtools.context.views.buildStaticDirs)
5253
mountStaticHandler(app, baseUrl, distDir)
5354

54-
app.use(DEVTOOLS_MOUNT_PATH, h3)
55+
app.use(DEVTOOLS_MOUNT_PATH_NO_TRAILING_SLASH, h3)
5556
app.use('/', defineHandler(event => sendRedirect(event, DEVTOOLS_MOUNT_PATH, 302)))
5657

5758
const server = createServer(toNodeHandler(app))

0 commit comments

Comments
 (0)