nxext / nx-extensions

Nx Extensions for Stencil, Svelte, SolidJS, Preact, Ionic, and Capacitor
MIT License
458 stars 101 forks source link

Svelte: Cypress fails because of missing configuration in vite #1032

Open floratmin opened 1 year ago

floratmin commented 1 year ago

When generating an application with cypress e2e the command nx run app-e2e:e2e fails with

Failed to load url /src/main.ts (resolved id: /home/workspace/app/src/main.ts). Does the file exist?
The request url "/home/workspace/app/src/main.ts" is outside of Vite serving allow list.

When I add

fs: {
    allow: [process.cwd()],
},

in the file vite.config.ts in the config under the key server, then the tests are working.