mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
Fixing windows build (#849)
Co-authored-by: Ingvar Stepanyan <rreverser@google.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user