mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-12-22 16:30:13 +00:00
Update vite.config.ts
This commit is contained in:
parent
fe0bb21b37
commit
6f1243f722
1 changed files with 3 additions and 3 deletions
|
@ -60,11 +60,11 @@ export default defineConfig(({ command, mode }) => {
|
||||||
css: {
|
css: {
|
||||||
modules: {
|
modules: {
|
||||||
generateScopedName: (name, filename, css) => {
|
generateScopedName: (name, filename, css) => {
|
||||||
|
const id = (path.relative(__dirname, filename.split('?')[0]) + '-' + name).replace(/[\\\/\.\?&=]/g, '-').replace(/(src-|vue-)/g, '');
|
||||||
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(id)).substring(0, 4);
|
||||||
} else {
|
} else {
|
||||||
//return 'x' + toBase62(hash(`${filename} ${name}`)).substring(0, 4) + '-' + name;
|
return id;
|
||||||
return (path.relative(__dirname, filename.split('?')[0]) + '-' + name).replace(/[\\\/\.\?&=]/g, '-').replace(/(src-|vue-)/g, '');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue