Fix vite static copy normalizePath for Windows build
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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: './'
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user