mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +00:00 
			
		
		
		
	merge: partially un-hash CSS class names (#109)
This commit is contained in:
		
						commit
						38412eef18
					
				
					 1 changed files with 2 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -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);
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue