@@ -6,19 +6,25 @@ import postcssModules from "postcss-modules";
6
6
import autoPrefixer from "autoprefixer" ;
7
7
import { compile } from "sass" ;
8
8
9
+ /** Craete UUID */
9
10
const uuid = ( ) => ( Date . now ( ) * Math . random ( ) ) . toString ( 36 ) . slice ( 0 , 8 ) ;
10
11
11
12
interface CSSPluginOptions {
12
- /** by default name is generated without hash so that it is easier and reliable for library users to override some CSS */
13
- generateScopedName ?: string | ( ( className : string , filename : string , css : string ) => string ) ;
13
+ /**
14
+ * By default name is generated without hash so that it is easier and reliable for library users to override some CSS.
15
+ * Refer [loader-utils docs](https://github.com/webpack/loader-utils?tab=readme-ov-file#interpolatename) for more options
16
+ * @defaultValue A function that generates name similar to [name]__[local] but without .module
17
+ */
18
+ generateScopedName ?: string | ( ( className : string , path : string , css : string ) => string ) ;
14
19
/** set skipAutoPrefixer to true to disable autoprefixer */
15
20
skipAutoPrefixer ?: boolean ;
16
- /** global CSS class prefix. @defaultValue "" */
21
+ /** global CSS class prefix. @defaultValue undefined */
17
22
globalPrefix ?: string ;
18
- /** If you want to keep .module.css files */
23
+ /** If you want to keep .module.css files. @defaultValue undefined */
19
24
keepModules ?: boolean ;
20
25
}
21
26
27
+ /** Combine client and server CSS */
22
28
function generateCombinedCSS ( result : BuildResult ) {
23
29
/** generate combined server and client CSS */
24
30
const serverRegExp = new RegExp ( `server\\${ path . sep } index\\.css` ) ;
0 commit comments