Skip to content

Commit

Permalink
Merge pull request #872 from preactjs/module-css-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister authored Sep 19, 2021
2 parents 580226b + e5ad0d7 commit ae552e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/young-carrots-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'wmr': patch
---

Normalize the cacheKey in wmr-midddleware so it always corresponds to the WRITE_CACHE map where we store in native-path format keys
2 changes: 2 additions & 0 deletions packages/wmr/src/wmr-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ export default function wmrMiddleware(options) {

// TODO: Vefify prefix mappings in write cache
cacheKey = prefix + id;
// Normalize the cacheKey so it matches what will be in the WRITE_CACHE, where we store in native paths
cacheKey = cacheKey.split(posix.sep).join(sep);

if (!hasIdPrefix) {
id = `./${id}`;
Expand Down

0 comments on commit ae552e6

Please sign in to comment.