Skip to content

Commit b52e508

Browse files
committed
chore(build): fix entryFileNames on non-posix platforms
1 parent 41b3b9e commit b52e508

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

vite.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ export default defineConfig({
3636
);
3737
return path.join("modules", relativePath);
3838
}
39+
if (info.facadeModuleId?.includes("src")) {
40+
const idx = info.facadeModuleId.lastIndexOf("src");
41+
const relativeDir = path.dirname(info.facadeModuleId.slice(
42+
idx + "src/".length,
43+
));
44+
return path.join(relativeDir, `${info.name}.js`)
45+
}
3946
return "[name].js";
4047
},
4148
chunkFileNames: "[name]-[hash].js",

0 commit comments

Comments
 (0)