-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Astro config conflict / misalignment with Vite config on server.open expected type ( boolean vs boolean & string) #8192
Copy link
Copy link
Closed
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)feat: devRelated to `astro dev` CLI command (scope)Related to `astro dev` CLI command (scope)
Description
What version of astro are you using?
2.10.4
Are you using an SSR adapter? If so, which one?
Node
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome
Describe the Bug
This works:
// astro.config.mjs
export default defineConfig({
server: {
port: 3000,
open: true,
},
looking into the vite config though: https://vitejs.dev/config/server-options.html#server-open
this should also work:
export default defineConfig({
server: {
open: '/docs/index.html',
},
})
but it doesnt:
[config] Astro found issue(s) with your configuration:
! server.open Expected boolean, received string.
Follow up question: in the astro docs, open is not documented at all. Yet it still works. This is a little confusing.
What's the expected result?
Dev server should open at the designated path.
Link to Minimal Reproducible Example
not relevant
Participation
- I am willing to submit a pull request for this issue.
- Here you go: Fixing type to align with Vite configuration #8193
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)feat: devRelated to `astro dev` CLI command (scope)Related to `astro dev` CLI command (scope)