mammadataei / cypress-vite

Run Cypress specs using Vite
MIT License
87 stars 11 forks source link

cypress-vite cannot build a SvelteKit app #16

Closed wtachau closed 1 year ago

wtachau commented 1 year ago

While updating our Svelte app to use SvelteKit, we came across this issue where building our Cypress tests with cypress-vite no longer works correctly— it seems like some of the Vite config options are getting overridden, or not read correctly.

I assume the core issue here is with SvelteKit rather than cypress-vite, but figured a workaround in this library might be possible.

A minimal reproduceable example is available at https://github.com/wtachau/cypress-svelte-kit.

image

mammadataei commented 1 year ago

Hi @wtachau, Thanks for the reproduction.

I think the issue is due to a configuration collision between the cypress-vite and svelte-kit. It is probably coming from the svelte-kit plugin cause cypress-vite doesn't contain anything specific.

Anyway, I fixed it by creating a separate vite configuration for cypress-vite. https://github.com/wtachau/cypress-svelte-kit/pull/1

I hope it solves the problem.

github-actions[bot] commented 1 year ago

This issue is automatically marked as stale because it has been open for 30 days with no activity. Remove the stale label or leave a comment, or it will be closed in 14 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 14 days with no activity. Please feel free to open a new issue if you have any further questions.