Fixing windows build (#849)

Co-authored-by: Ingvar Stepanyan <rreverser@google.com>
This commit is contained in:
Jake Archibald
2020-11-19 15:03:51 +00:00
committed by GitHub
parent 6ebf94d1b6
commit 30b628c1b9
6 changed files with 15 additions and 17 deletions

View File

@@ -52,7 +52,7 @@ function jsFileName(chunkInfo) {
const parsedPath = path.parse(chunkInfo.facadeModuleId);
if (parsedPath.name !== 'index') return jsPath;
// Come up with a better name than 'index'
const name = parsedPath.dir.split('/').slice(-1);
const name = parsedPath.dir.split(/\\|\//).slice(-1);
return jsPath.replace('[name]', name);
}