You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(@angular/build): serve build assets and styles in vitest
Adds a Vite middleware to the Vitest runner to serve assets and global stylesheets that are part of the build output.
Previously, when running component tests with Vitest, any referenced assets (such as images in an `<img>` tag) or component stylesheets would result in a 404 error because the Vite server was not configured to serve them.
This change introduces a middleware that intercepts requests for non-script files. It checks against the build's output files and serves the corresponding asset directly from memory or disk. This ensures that the test environment accurately reflects the assets available during a real build, allowing components to render correctly for testing.
0 commit comments