Skip to content

Commit

Permalink
feat: experimental.buildAdvancedBaseOptions (#8450)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored Jun 20, 2022
1 parent c1d6140 commit ab7150f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/plugin-vue/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ export function resolveTemplateCompilerOptions(
// relative paths directly to absolute paths without incurring an extra import
// request
if (filename.startsWith(options.root)) {
const devBase = options.devServer.config.base
assetUrlOptions = {
base:
(options.devServer.config.server?.origin ?? '') +
options.devServer.config.base +
devBase +
slash(path.relative(options.root, path.dirname(filename)))
}
}
Expand Down
6 changes: 4 additions & 2 deletions playground/vitestSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,10 @@ export async function startDefaultServe(): Promise<void> {
viteConfig = testConfig
server = await (await createServer(testConfig)).listen()
// use resolved port/base from server
const base = server.config.base === '/' ? '' : server.config.base
viteTestUrl = `http://localhost:${server.config.server.port}${base}`
const devBase = server.config.base
viteTestUrl = `http://localhost:${server.config.server.port}${
devBase === '/' ? '' : devBase
}`
await page.goto(viteTestUrl)
} else {
process.env.VITE_INLINE = 'inline-build'
Expand Down

0 comments on commit ab7150f

Please sign in to comment.