new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Vitest · Config reference · all subjects

config/css

7 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

css.modules option type and default

The css.modules option has type { classNameStrategy? } with default value of an empty object {}. It controls how CSS modules are processed, specifically the strategy for generating class names.

css config option type and default

The css configuration option accepts either a boolean or an object with optional include, exclude, and modules properties. When set to a boolean value, it controls if CSS should be processed. When excluded, CSS files will be replaced with empty strings. CSS Modules will return a proxy to not affect runtime.

css.include pattern type and default

The css.include option has type RegExp | RegExp[] with default value of an empty array []. It defines RegExp patterns for files that should return actual CSS and will be processed by Vite pipeline. To process all CSS files, use the pattern /.+/.

css.exclude pattern type and default

The css.exclude option has type RegExp | RegExp[] with default value of an empty array []. It defines RegExp patterns for files that will return an empty CSS file.

css.modules.classNameStrategy type and default

The css.modules.classNameStrategy option has type 'stable' | 'scoped' | 'non-scoped' with default value 'stable'. The 'stable' strategy generates class names as _${name}_${hashedFilename}, which remain the same if CSS content changes but change if the file is renamed or moved. The 'scoped' strategy generates class names as usual, respecting css.modules.generateScopedName method if present, defaulting to _${name}_${hash} where hash includes filename and content. The 'non-scoped' strategy does not hash class names.

css option not applied to browser tests

The CSS configuration option is not applied to browser tests.

CSS Modules proxy behavior default

By default, Vitest exports a proxy for CSS Modules, bypassing CSS Modules processing. If you rely on CSS properties on your classes, you must enable CSS processing using the include option.

Give your agent this brain