mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 18:46:19 +08:00
chore(core): update webpack hash logic (#3308)
This commit is contained in:
@@ -1,13 +1,5 @@
|
||||
import { createHash } from 'node:crypto';
|
||||
import type { BuildFlags } from '@affine/cli/config';
|
||||
|
||||
export function hash(content: string): string {
|
||||
const hash = createHash('sha512');
|
||||
hash.update(content);
|
||||
const pkgHash = hash.digest('hex');
|
||||
return pkgHash.substring(0, 8);
|
||||
}
|
||||
|
||||
export function computeCacheKey(buildFlags: BuildFlags) {
|
||||
return [
|
||||
'1',
|
||||
|
||||
Reference in New Issue
Block a user