RedHatInsights / frontend-components

Apache License 2.0
33 stars 100 forks source link

[create-crc-app] CSS changes are not loaded #1783

Open josejulio opened 1 year ago

josejulio commented 1 year ago

After creating the application and trying to make changes to the css, the changes are not being reflected.

After some inspection it looks like it's an error related to the app name.

The app name is virtual-assistant and the problem seems to be that the css is preprended with .virtual-assistant but the actual class name is virtualAssistant in the DOM.

screenshot_2023-07-18T13:26:01 screenshot_2023-07-18T13:27:53

Hyperkid123 commented 1 year ago

@josejulio the name difference is expected due to some webpack limitation. Usually, this is fixed by adding sassPrefix config to the fec.config.js. In this case, it would be something like

sassPrefix: '.virtual-assistant .virtualAssistant'

I think we should add this config automatically if we find the appname contains a - character.

josejulio commented 1 year ago

That didn't work well, as .virtual-assistant doesn't exist in the DOM.

screenshot_2023-07-19T12:53:51

But this did:

sassPrefix: '.virtualAssistant',

Thanks!