-
Notifications
You must be signed in to change notification settings - Fork 544
Closed
Description
Inertia version
3.x (beta)
Inertia adapter(s) affected
- React
- Vue 3
- Svelte
- Not Applicable
JS package version
@inertiajs/vite: 3.0.0-beta.1
Backend stack (optional)
I'm using Symfony with pentatrion/vite-bundle. But it shouldn't matter here.
Describe the problem
Hey, while testing the new Dev Server SSR support in the Inertia 3 Beta, I noticed that CSS URLs are incorrectly constructed when a custom base path is defined in the Vite configuration.
I'm not really experienced with the inner workings of Vite, but i suspect that problem is that the origin already contains the base path here:
inertia/packages/vite/src/css.ts
Line 39 in 76906f3
| const href = `${origin}${basePrefix}${url}` |
Current link tag output:
<link rel="stylesheet" href="https://localhost:5172/build/build//@fs//Users/<...>/assets/styles/app.css">Expected output:
<link rel="stylesheet" href="https://localhost:5172/build/@fs//Users/<...>/assets/styles/app.css">Steps to reproduce
// vite.config.ts
export default defineConfig({
plugins: [
inertia({ ssr: 'assets/ssr.ts' })
],
base: '/build/', // This causes the issue
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels