{// specify virtual CSS module id (e.g. virtual:master.css)module: 'master.css',// specify config file path or set `Config`config: 'master.css.{ts,js,mjs,cjs}',// forcibly specify sources for scanning, not excluded by `options.exclude`sources: [],// specify sources for scanninginclude: ['**/*.{html,js,jsx,ts,tsx,svelte,astro,vue,md,mdx,pug,php}'],// specify sources to excludeexclude: ['**/node_modules/**','**/*.d.ts','**/*.test.*','node_modules','master.css.{js,ts,mjs,cjs}','dist','out','README.md'],// whitelist of class names for unpredictable dynamicsfixedClasses: [],// blacklist of class names to exclude accidentally capturedignoredClasses: [],// or RegExp[]cwd: process.cwd()}
Methods
// Initialize the compiler and MasterCSSinit(): this
// Scan sources, extract class names, and generate CSS rulescompile()
// Extract potential class names from the given file contentextract(name: string,content: string): string[]