cascornelissen / svg-spritemap-webpack-plugin

SVG spritemap plugin for webpack
MIT License
207 stars 49 forks source link

Windows pattern #196

Closed TiDaGo closed 2 years ago

TiDaGo commented 2 years ago

pattern: like this new './src/files/sprite-images/*/.svg'

in options-formatter.js output.input.patterns = output.input.patterns.map((pattern) => { console.log(pattern); var result = path.normalize(pattern); console.log(result); return result; });

pattern like my, but result like windows ) .\src\files\sprite-images*\.svg

and in index.js glob.sync(pattern, inputOptions.options).map((match) => { not working with this pattern.

cascornelissen commented 2 years ago

Oops, seems like an oversight with the update to glob@8, I've removed this in cda8566 as I'm 99% sure this is no longer necessary with the changes done in glob.

Could you try it out on your end by installing directly from master by running the following command?

npm install cascornelissen/svg-spritemap-webpack-plugin#master
TiDaGo commented 2 years ago

Thx, Now it's working ! but my package.json - "svg-spritemap-webpack-plugin": "github:cascornelissen/svg-spritemap-webpack-plugin#master",

))))

cascornelissen commented 2 years ago

Definitely update to the new version once I push out a release, you don't want to stick to the master branch as that has a chance of breaking at any time in the future.

cascornelissen commented 2 years ago

I have just published 4.4.2 to npm. Thanks for testing! ❤️