fix(build): Fix path issue on Windows (#7127)

Fixes #6864.
This commit is contained in:
Christopher Allen
2023-06-01 13:27:38 +01:00
committed by GitHub
parent 91be84ab7c
commit 3ae4a61842

View File

@@ -560,7 +560,7 @@ function getChunkOptions() {
// Figure out which chunk this is by looking for one of the
// known chunk entrypoints in chunkFiles. N.B.: O(n*m). :-(
const chunk = chunks.find(
chunk => chunkFiles.find(f => f.endsWith('/' + chunk.entry)));
chunk => chunkFiles.find(f => f.endsWith(path.sep + chunk.entry)));
if (!chunk) throw new Error('Unable to identify chunk');
// Replace nicknames with the names we chose.