-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix build errors with Vite .css?url
imports
#8829
Conversation
🦋 Changeset detectedLatest commit: b036cdd The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
...ssrCssUrlFilePaths, | ||
...ssrChunkAssetPaths, | ||
]); | ||
let clientAssetPaths = getViteManifestAssetPaths(clientViteManifest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the root of the issue. The logic for extracting assets from the client and server builds differed. These need to be the same because we compare their assets to detect any server-only assets that need to be moved to the client build directory (e.g. .css?url
imports that are only ever used in a loader, so they don't get included in the client build). The linked issue was because we were attempting to move a file to a path that already existed.
.css?url
imports.css?url
imports
🤖 Hello there, We just published version Thanks! |
Fixes #8813
The linked issue was introduced in #8796 but slipped through because the Vite CSS test didn't assert the build command succeeded without any output to
stderr
. The test still managed to pass because the build output still worked if you ignored the error message which meant all of our assertions still passed. I've updated the test to catch this issue along with the fix.