File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -116,10 +116,11 @@ export function resolveTemplateCompilerOptions(
116
116
// relative paths directly to absolute paths without incurring an extra import
117
117
// request
118
118
if ( filename . startsWith ( options . root ) ) {
119
+ const devBase = options . devServer . config . base
119
120
assetUrlOptions = {
120
121
base :
121
122
( options . devServer . config . server ?. origin ?? '' ) +
122
- options . devServer . config . base +
123
+ devBase +
123
124
slash ( path . relative ( options . root , path . dirname ( filename ) ) )
124
125
}
125
126
}
Original file line number Diff line number Diff line change @@ -214,8 +214,10 @@ export async function startDefaultServe(): Promise<void> {
214
214
viteConfig = testConfig
215
215
server = await ( await createServer ( testConfig ) ) . listen ( )
216
216
// use resolved port/base from server
217
- const base = server . config . base === '/' ? '' : server . config . base
218
- viteTestUrl = `http://localhost:${ server . config . server . port } ${ base } `
217
+ const devBase = server . config . base
218
+ viteTestUrl = `http://localhost:${ server . config . server . port } ${
219
+ devBase === '/' ? '' : devBase
220
+ } `
219
221
await page . goto ( viteTestUrl )
220
222
} else {
221
223
process . env . VITE_INLINE = 'inline-build'
You can’t perform that action at this time.
0 commit comments