Skip to content

Commit 2074911

Browse files
committed
Add support for store-specific CSS paths in ReactInjectPlugin. Implement methods to retrieve store codes and check for the existence of store-specific folders, allowing for optimized CSS loading based on the current store context. Update README.md to reflect these changes.
1 parent d8e166e commit 2074911

5 files changed

Lines changed: 939 additions & 110 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ You can also replace Magento CSS with your custom CSS files if you put them comp
6262
$optimisedCSSFilePath = BP . '/pub/static/styles-m.css';
6363
```
6464

65+
## Store specific styles
66+
67+
The module supports store-specific CSS files for multi-store setups. By default, optimized CSS files are located in `/pub/static/` for the default store. For other stores, CSS files should be placed in `/pub/static/{store_code}/` directory. For example:
68+
- Default store: `/pub/static/product-styles-m.css`
69+
- French store (`fr`): `/pub/static/fr/product-styles-m.css`
70+
- German store (`de`): `/pub/static/de/product-styles-m.css`
71+
72+
The module automatically detects the current store code and loads the appropriate CSS files. If store-specific files don't exist, it falls back to the default store files. This allows you to customize styles per store while maintaining a fallback mechanism.
73+
6574

6675
# VueJS support
6776

0 commit comments

Comments
 (0)