1
0
mirror of synced 2026-03-23 02:58:34 +08:00

chore: 更新vite

This commit is contained in:
roymondchen
2026-03-17 16:52:46 +08:00
parent 3e4d49dd45
commit 6d91a7a844
16 changed files with 1344 additions and 1143 deletions

View File

@@ -2,9 +2,6 @@ import { defineConfig } from 'vite';
import baseConfig from '../vite.config';
const INVALID_CHAR_REGEX = /[\x00-\x1F\x7F<>*#"{}|^[\]`;?:&=+$,]/g;
const DRIVE_LETTER_REGEX = /^[a-z]:/i;
export default defineConfig({
...baseConfig,
@@ -18,15 +15,5 @@ export default defineConfig({
emptyOutDir: false,
sourcemap: true,
outDir: '../dist/playground',
rollupOptions: {
output: {
// https://github.com/rollup/rollup/blob/master/src/utils/sanitizeFileName.ts
sanitizeFileName(name) {
const match = DRIVE_LETTER_REGEX.exec(name);
const driveLetter = match ? match[0] : '';
return driveLetter + name.slice(driveLetter.length).replace(INVALID_CHAR_REGEX, '');
},
},
},
},
});