My hacky solution is to customize the location of my built files, this resolves filename collision.
rollupOptions:{
output:{
chunkFileNames:(c)=>{
if (c.moduleIds[0].includes("@babylonjs/core/ShadersWGSL/")){
return "wgsl/[name]-[hash].js";
}
if (c.moduleIds[0].includes("@babylonjs/core/Shaders/")){
return "glsl/[name]-[hash].js";
}
return "[name]-[hash].js";
}
}
}
Not very robust, use at your own discretion or as a base for your own customization. Leaving it here for other vite users. Marking as solved, cheers!