Skip to content

Commit ddbad41

Browse files
committed
fix
1 parent 04399e8 commit ddbad41

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/slidev/node/setups/indexHtml.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ export default function setupIndexHtml({ mode, entry, clientRoot, userRoot, root
5555
if (data.headmatter.lang)
5656
main = main.replace('<html lang="en">', `<html lang="${data.headmatter.lang}">`)
5757

58+
const baseInDev = mode === 'dev' && base ? base.slice(0, -1) : ''
5859
main = main
59-
.replace('__ENTRY__', (base?.slice(0, -1) ?? '') + toAtFS(join(clientRoot, 'main.ts')))
60+
.replace('__ENTRY__', baseInDev + toAtFS(join(clientRoot, 'main.ts')))
6061
.replace('<!-- head -->', head)
6162
.replace('<!-- body -->', body)
6263

0 commit comments

Comments
 (0)