Skip to content

Commit

Permalink
fix: fix Windows path handling in emitAssetDirectory (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
yichi-yang authored Mar 22, 2022
1 parent bbb3be9 commit 38f839f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/asset-relocator.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ module.exports = async function (content, map) {
assetExpressions += " + " + code.substring(wildcard.start, wildcard.end);
}
if (curPattern.length) {
assetExpressions += " + \'" + JSON.stringify(curPattern).replace(/\\/g, '/').slice(1, -1) + "'";
assetExpressions += " + \'" + JSON.stringify(curPattern.replace(/\\/g, '/')).slice(1, -1) + "'";
}
}
return "__webpack_require__.ab + " + JSON.stringify((name + firstPrefix).replace(/\\/g, '/')) + assetExpressions;
Expand Down

0 comments on commit 38f839f

Please sign in to comment.