Skip to content

Commit

Permalink
Fix CSS Modules Relative Path on Windows (#9709)
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer authored Dec 11, 2019
1 parent 808a21c commit c4c3173
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ export function getCssModuleLocalIdent(
exportName: string,
options: object
) {
const relativePath = path.posix.relative(
context.rootContext,
context.resourcePath
)
const relativePath = path
.relative(context.rootContext, context.resourcePath)
.replace(/\\+/g, '/')

// Generate a more meaningful name (parent folder) when the user names the
// file `index.module.css`.
Expand Down

0 comments on commit c4c3173

Please sign in to comment.