mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-19 11:12:36 +02:00
fix(v2): fix Webpack persistent caching (evict on swizzle/alias/config change) (#5047)
* webpack upgrade * refactor docusaurus-utils hash fns * Fix webpack cache eviction problems on config/aliases/swizzle changes * Move/Rename InitPlugin type * fix TS typos * Add tests for webpack aliases * fix windows tests
This commit is contained in:
parent
9916a0b4a4
commit
99270dbab2
38 changed files with 274 additions and 169 deletions
|
@ -7,8 +7,6 @@
|
|||
|
||||
// Based on https://github.com/gatsbyjs/gatsby/pull/21518/files
|
||||
|
||||
import {createHash} from 'crypto';
|
||||
|
||||
// MacOS (APFS) and Windows (NTFS) filename length limit = 255 chars, Others = 255 bytes
|
||||
const MAX_PATH_SEGMENT_CHARS = 255;
|
||||
const MAX_PATH_SEGMENT_BYTES = 255;
|
||||
|
@ -42,7 +40,3 @@ export const shortName = (str: string): string => {
|
|||
)
|
||||
.toString();
|
||||
};
|
||||
|
||||
export function simpleHash(str: string, length: number): string {
|
||||
return createHash('md5').update(str).digest('hex').substr(0, length);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue