Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
merge: partially un-hash CSS class names (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marie authored Oct 22, 2023
2 parents 6d29022 + 4a4fd70 commit 38412ee
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,8 @@ export function getConfig(): UserConfig {
modules: {
generateScopedName(name, filename, _css): string {
const id = (path.relative(__dirname, filename.split('?')[0]) + '-' + name).replace(/[\\\/\.\?&=]/g, '-').replace(/(src-|vue-)/g, '');
if (process.env.NODE_ENV === 'production') {
return 'x' + toBase62(hash(id)).substring(0, 4);
} else {
return id;
}
const shortId = id.replace(/^(components(-global)?|widgets|ui(-_common_)?)-/, '');
return shortId + '-' + toBase62(hash(id)).substring(0, 4);
},
},
},
Expand Down

0 comments on commit 38412ee

Please sign in to comment.