Using CSS Modules in Projects

CSS modules are CSS files with class and animation names scoped locally. The cssCompilation key enables the use of these in your project, and configures the extensions that Codux should identify as CSS modules.

cssCompilation 

  • Description: Enables CSS modules in your project.
  • Type: Object {}
  • Properties: activateCssModules (boolean), cssModulesExt (Array<string>)

Property: activateCssModules (boolean) 

The activateCssModules property enables or disables the use of CSS modules. The default is true (enabled).

" level="3">Property: cssModulesExt (array) 

The cssModulesExt property configures the file type extensions to load as modules.

Example 

Here's a basic configuration example for both properties:
1
2
3
4
5
6
7
8
{  
    "cssCompilation": {
        "activateCssModules": true,
        "cssModulesExt": [
            ".modules.css"
        ]
    }
}