preactjs/wmr

Styles from Css modules not being applied in dev mode on windows

RodrigoJuliano opened this issue · 3 comments

Describe the bug
Styles using class selector in css modules are not applied. Non module css works fine. No console or terminal errors.
Running from wsl all works fine.

To Reproduce
Steps to reproduce the behavior:

  1. Run the demo yarn demo start
  2. Open the page in a browser
  3. See that the background color and font color are not applied to home section

Expected behavior
All styles from css modules must be applied

Bug occurs with:

  • wmr or wmr start (development)
  • wmr build (production)
  • wmr serve

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: chrome, edge
  • Node Version: v14.17.6 (lts)
  • WMR Version: 3.7.1

Additional context

I've just tried doing this by creating a file named style.module.css with content:

.abc {
	background-color: blue;
}

And applied it to the div of the demo and it all seemed to work well on Windows 10 Node 14 chrome. This all works well for me, do you have something extra by any chance?

Both importing import { abc } from './style.module.css'; and import * as styles from './style.module.css'; seems to work as well

The css is not being transformed
Running on windows:
image

Running on wsl:
image

I found that css files in the root are transformed but in subfolders they are not. Can you confirm? Maybe it's a problem with path conversion.