Skip to content

Using the webServer config with a Vite dev server? #21227

@coreybyrum7

Description

@coreybyrum7

Discussed in https://github.com/microsoft/playwright/discussions/18873

Originally posted by alexbjorlig November 17, 2022
I'm trying to use playwright with a Vite dev server.

In my config I have

webServer: {
        command: 'npm run dev -- test',
        url: 'http://localhost:3000/',
        timeout: 10 * 1000,
        reuseExistingServer: !process.env.CI,
    },

But it does not seem to actually work. It simply times out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions