Skip to content

Astro config conflict / misalignment with Vite config on server.open expected type ( boolean vs boolean & string) #8192

Closed
@gkatsanos

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    - P2: nice to haveNot breaking anything but nice to have (priority)feat: devRelated to `astro dev` CLI command (scope)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions