Fix vite static copy normalizePath for Windows build

This commit is contained in:
Халимов Рустам
2026-03-19 22:50:50 +03:00
parent 71667f8948
commit 74cae687a5
3 changed files with 245 additions and 5 deletions
+2 -1
View File
@@ -31,6 +31,7 @@
"@vitejs/plugin-react": "^4.3.4",
"tailwindcss": "^4.0.0",
"typescript": "^5.7.3",
"vite": "^6.0.0"
"vite": "^6.0.0",
"vite-plugin-static-copy": "^3.3.0"
}
}
+6 -3
View File
@@ -1,8 +1,11 @@
import { defineConfig } from 'vite';
import { defineConfig, normalizePath } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import { viteStaticCopy } from 'vite-plugin-static-copy';
import path from 'path';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
export default defineConfig({
envDir: '../../',
@@ -12,7 +15,7 @@ export default defineConfig({
viteStaticCopy({
targets: [
{
src: path.resolve(__dirname, '../shared/sounds'),
src: normalizePath(path.resolve(__dirname, '../shared/sounds')),
dest: './'
}
]