diff --git a/contributors.yml b/contributors.yml index cee0a803dfd..099ecae16e0 100644 --- a/contributors.yml +++ b/contributors.yml @@ -632,6 +632,7 @@ - TimonVS - tjefferson08 - tmcw +- tobigumo - tombiju - tombohub - tombyrer diff --git a/packages/remix-dev/vite/plugin.ts b/packages/remix-dev/vite/plugin.ts index 7ff22795066..ceb11cf13d2 100644 --- a/packages/remix-dev/vite/plugin.ts +++ b/packages/remix-dev/vite/plugin.ts @@ -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 @@ -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);