Unverified Commit c4c31732 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Fix CSS Modules Relative Path on Windows (#9709)

parent 808a21cf
...@@ -8,10 +8,9 @@ export function getCssModuleLocalIdent( ...@@ -8,10 +8,9 @@ export function getCssModuleLocalIdent(
exportName: string, exportName: string,
options: object options: object
) { ) {
const relativePath = path.posix.relative( const relativePath = path
context.rootContext, .relative(context.rootContext, context.resourcePath)
context.resourcePath .replace(/\\+/g, '/')
)
// Generate a more meaningful name (parent folder) when the user names the // Generate a more meaningful name (parent folder) when the user names the
// file `index.module.css`. // file `index.module.css`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment