Skip to content

Commit 7418815

Browse files
committed
Fix some path math on Windows
1 parent d71e84b commit 7418815

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎webpack.config.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ module.exports = {
193193
* @return {string} The returned paths will look like `img/warning.1234567.svg`.
194194
*/
195195
function getImgOutputPath(url, resourcePath) {
196-
const prefix = /^.*\/res\//;
196+
const prefix = /^.*[/\\]res[/\\]/;
197197
const outputDir = path.dirname(resourcePath).replace(prefix, "");
198198
return path.join(outputDir, path.basename(url));
199199
}

0 commit comments

Comments
 (0)