refactor(client): use css modules
This commit is contained in:
parent
d10e000883
commit
3f033d6ab7
5 changed files with 72 additions and 67 deletions
|
|
@ -59,7 +59,11 @@ export default defineConfig(({ command, mode }) => {
|
|||
css: {
|
||||
modules: {
|
||||
generateScopedName: (name, filename, css) => {
|
||||
return 'x' + toBase62(hash(`${filename} ${name}`)).substring(0, 4);
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
return 'x' + toBase62(hash(`${filename} ${name}`)).substring(0, 4);
|
||||
} else {
|
||||
return 'x' + toBase62(hash(`${filename} ${name}`)).substring(0, 4) + '-' + name;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue