Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playwright webserver command should run build before preview? #263

Open
vincerubinetti opened this issue May 4, 2023 · 0 comments
Open

Comments

@vincerubinetti
Copy link

vincerubinetti commented May 4, 2023

Currently, create-vue generates a playwright config that has something like this in it:

{
  webServer: {
    /**
     * use the dev server by default for faster feedback loop. Use the preview
     * server on CI for more realistic testing
     */
    command: process.env.CI
      ? "vite preview --port 5173"
      : "vite dev",
    port: 5173,
    reuseExistingServer: !process.env.CI,
  }
}

Shouldn't we need to run build before preview so that the app actually exists?

I ran into problems running my tests on GitHub Actions, and it took me a while to figure out that this was the cause. See:
vitejs/vite#4572

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant