Glob doesn't find anything on windows
See original GitHub issueDescription I have a folder with a bunch of SVG files on windows, I set SVGSpriteMapPlugin like this:
new SVGSpriteMapPlugin(path.join(__dirname,"src","assets","images","vector","workspaceGallery","*.svg").replace(/\\/g,'/'), {
output: {
filename: `sprites/workspaceSprites.svg`,
svgo: true
},
sprite: {
prefix: false,
generate: {
title: false
}
}
})
But once I run it it seems that path gets normalized here in line 63 back to backslash based lines which doesnt seem to work with glob.sync anymore (updateDependencies function)
I’m pretty sure i’m missing something here because this used to work for me up until I reinstalled the entire node_modules, that being said, I did find this node-glob issue which seems to say the same thing. see also this one
my hacky solution in the meantime is to override use to glob 7.2.0
Expected behavior The svg files are found no matter what system you use
Actual behavior glob doesn’t find any svg files if the paths are normalized to windows (using backlashes)
System information Windows 10
Minimal reproduction Minimal Example
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
I’m closing this as this seems to be resolved, feel free to comment if I misinterpreted 😘
Glob 7.2.3 was released a few hours ago, which should contain the fix to this issue.