Skip to content
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 error when using vite-imagetool #9800

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@
- TimonVS
- tjefferson08
- tmcw
- tobigumo
- tombiju
- tombohub
- tombyrer
Expand Down
6 changes: 5 additions & 1 deletion packages/remix-dev/vite/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,7 @@ export const remixVitePlugin: RemixVitePlugin = (remixUserConfig = {}) => {
let clientViteManifest = await loadViteManifest(clientBuildDirectory);

let clientFilePaths = getViteManifestFilePaths(clientViteManifest);
let clientAssetPaths = getViteManifestAssetPaths(clientViteManifest);
let ssrAssetPaths = getViteManifestAssetPaths(ssrViteManifest);

// We only move assets that aren't in the client build, otherwise we
Expand All @@ -1418,7 +1419,10 @@ export const remixVitePlugin: RemixVitePlugin = (remixUserConfig = {}) => {
let movedAssetPaths: string[] = [];
for (let ssrAssetPath of ssrAssetPaths) {
let src = path.join(serverBuildDirectory, ssrAssetPath);
if (!clientFilePaths.has(ssrAssetPath)) {
if (
!clientFilePaths.has(ssrAssetPath) &&
!clientAssetPaths.has(ssrAssetPath)
) {
let dest = path.join(clientBuildDirectory, ssrAssetPath);
await fse.move(src, dest);
movedAssetPaths.push(dest);
Expand Down