diff --git a/packages/vitest/src/integrations/css/css-modules.ts b/packages/vitest/src/integrations/css/css-modules.ts index 6c553166d..06bbe736e 100644 --- a/packages/vitest/src/integrations/css/css-modules.ts +++ b/packages/vitest/src/integrations/css/css-modules.ts @@ -2,7 +2,7 @@ import type { CSSModuleScopeStrategy } from '../../node/types/config' import { hash } from '../../node/hash' export function generateCssFilenameHash(filepath: string): string { - return hash('md5', filepath, 'hex').slice(0, 6) + return hash('sha1', filepath, 'hex').slice(0, 6) } export function generateScopedClassName( diff --git a/packages/vitest/src/node/cache/index.ts b/packages/vitest/src/node/cache/index.ts index 5a1e4ceb9..1c8478ec3 100644 --- a/packages/vitest/src/node/cache/index.ts +++ b/packages/vitest/src/node/cache/index.ts @@ -29,7 +29,7 @@ export class VitestCache { root, baseDir, 'vitest', - hash('md5', projectName || '', 'hex'), + hash('sha1', projectName || '', 'hex'), ) } }