Skip to main content

Tool - Vite

Add Node.js globals only to Vite and Vitest configuration files. Your application source keeps the globals from its selected runtime layer, while configuration code can use Node APIs without false positives.

Usage

Spread toolVite after the language and runtime layers.

eslint.config.mts
ts
import {
  dxCodeStyle,
  dxIgnore,
  langTypescript,
  runtimeBrowser,
  toolVite,
} from '@cbnventures/nova/presets/eslint';

export default [
  ...dxIgnore,
  ...dxCodeStyle,
  ...langTypescript,
  ...runtimeBrowser,
  ...toolVite,
];

What This Preset Configures

The preset scopes Node.js globals to vite.config.* and vitest.config.* files across JavaScript and TypeScript module extensions. It does not add Vite application rules or browser globals.