mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
Update vite.config.ts
This commit is contained in:
parent
668aa17eef
commit
027ef1ea4a
@ -1,3 +1,4 @@
|
|||||||
|
import path from 'path';
|
||||||
import pluginVue from '@vitejs/plugin-vue';
|
import pluginVue from '@vitejs/plugin-vue';
|
||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
@ -62,7 +63,8 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
return 'x' + toBase62(hash(`${filename} ${name}`)).substring(0, 4);
|
return 'x' + toBase62(hash(`${filename} ${name}`)).substring(0, 4);
|
||||||
} else {
|
} else {
|
||||||
return 'x' + toBase62(hash(`${filename} ${name}`)).substring(0, 4) + '-' + name;
|
//return 'x' + toBase62(hash(`${filename} ${name}`)).substring(0, 4) + '-' + name;
|
||||||
|
return (path.relative(__dirname, filename.split('?')[0]) + '-' + name).replace(/[\\\/\.\?&=]/g, '-').replace(/(src-|vue-)/g, '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user