Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Apr 8, 2024
1 parent 3ee23c8 commit 9f3fe5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1591,8 +1591,9 @@ class CssModulesJsonPlugin {
// Make path to be relative to `context` (your project root)
Object.fromEntries(
Object.entries(allExportsJson).map((key) => {
// eslint-disable-next-line no-param-reassign
key[0] = path.relative(compiler.context, key[0]);
key[0] = path
.relative(compiler.context, key[0])
.replace(/\\/g, "/");

return key;
}),
Expand Down
4 changes: 3 additions & 1 deletion test/helpers/get-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ class CssModulesJsonPlugin {
Object.fromEntries(
Object.entries(allExportsJson).map((key) => {
// eslint-disable-next-line no-param-reassign
key[0] = path.relative(compiler.context, key[0]);
key[0] = path
.relative(compiler.context, key[0])
.replace(/\\/g, "/");

return key;
}),
Expand Down

0 comments on commit 9f3fe5f

Please sign in to comment.