mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 02:43:09 +02:00
Merge branch 'develop' of https://github.com/transfem-org/Sharkey into develop
This commit is contained in:
commit
b0a7fd6ddb
1 changed files with 2 additions and 5 deletions
|
@ -83,11 +83,8 @@ export function getConfig(): UserConfig {
|
||||||
modules: {
|
modules: {
|
||||||
generateScopedName(name, filename, _css): string {
|
generateScopedName(name, filename, _css): string {
|
||||||
const id = (path.relative(__dirname, filename.split('?')[0]) + '-' + name).replace(/[\\\/\.\?&=]/g, '-').replace(/(src-|vue-)/g, '');
|
const id = (path.relative(__dirname, filename.split('?')[0]) + '-' + name).replace(/[\\\/\.\?&=]/g, '-').replace(/(src-|vue-)/g, '');
|
||||||
if (process.env.NODE_ENV === 'production') {
|
const shortId = id.replace(/^(components(-global)?|widgets|ui(-_common_)?)-/, '');
|
||||||
return 'x' + toBase62(hash(id)).substring(0, 4);
|
return shortId + '-' + toBase62(hash(id)).substring(0, 4);
|
||||||
} else {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue