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:
Sébastien Lorber 2021-06-24 12:56:56 +02:00 committed by GitHub
parent 9916a0b4a4
commit 99270dbab2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 274 additions and 169 deletions

View file

@ -22,8 +22,7 @@ import {
import resolvePathnameUnsafe from 'resolve-pathname';
import {posixPath as posixPathImport} from './posixPath';
import {simpleHash} from './pathUtils';
import {docuHash} from './docuHash';
import {simpleHash, docuHash} from './hashUtils';
export const posixPath = posixPathImport;
@ -32,8 +31,7 @@ export * from './codeTranslationsUtils';
export * from './markdownParser';
export * from './markdownLinks';
export * from './escapePath';
export * from './docuHash';
export {simpleHash} from './pathUtils';
export {md5Hash, simpleHash, docuHash} from './hashUtils';
const fileHash = new Map();
export async function generate(