Requests cannot be intercepted if you use vite v5 and have to set the following property for the dev server due to the workaround for the public folder: devServerPublicPathRoute: ''. This happens for component tests.
It doesn't matter if the fetch request uses relative or absolute url's.
Desired behavior
Cypress should intercept the request like before with vite v4. If you do not set devServerPublicPathRoute, the interception of requests will work. So it must be related to this. However, for me it is not an option to omit this property, because in our software I need some relative paths to the public folder used within shadow roots.
Current behavior
Requests cannot be intercepted if you use vite v5 and have to set the following property for the dev server due to the workaround for the public folder:
devServerPublicPathRoute: ''
. This happens for component tests. It doesn't matter if the fetch request uses relative or absolute url's.Desired behavior
Cypress should intercept the request like before with vite v4. If you do not set
devServerPublicPathRoute
, the interception of requests will work. So it must be related to this. However, for me it is not an option to omit this property, because in our software I need some relative paths to the public folder used within shadow roots.Test code to reproduce
modules:
Cypress Version
13.13.1
Node version
v22.2.0
Operating System
Windows 11
Debug Logs
No response
Other
No response