Skip to content

Commit

Permalink
Merge 3fc306d into d27041b
Browse files Browse the repository at this point in the history
  • Loading branch information
Tao-Oak committed Dec 19, 2019
2 parents d27041b + 3fc306d commit d9a093e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/utils/match-files.ts
Expand Up @@ -36,6 +36,14 @@ export const matchFiles = async (ctx: LoaderContext, options: StyleResourcesLoad
return partialFiles.filter(isStyleFile);
}),
);

return [...new Set(flatten(files))];
/*
* Glob always return unix style file path which would have problems on Windows.
* For more details, see: https://github.com/yenshih/style-resources-loader/issues/17
*
* Use path.resolve() method to convert the unix style file path to system compatible
* file path.
*/
const systemCompatibleFiles = flatten(files).map(file => path.resolve(file));

return [...new Set(systemCompatibleFiles)];
};

0 comments on commit d9a093e

Please sign in to comment.