The recommended integration: virtual module, HMR, verified against Vite 5/6/7/8. This guide covers the complete Vite setup for Nakshora 3.0.

Install#

terminal
bash
npm install -D @nakshora/vite-plugin

Configure#

vite.config.js
js
import { defineConfig } from 'vite';
import { nakshora } from '@nakshora/vite-plugin';

export default defineConfig({
  plugins: [
    nakshora({ content: ['./index.html', './src/**/*.{js,ts,jsx,tsx,vue}'] }),
  ],
});

Verify#

terminal
bash
npx nakshora doctor

Doctor validates your config, checks that content globs match real files, and prints the engine version.

Troubleshooting#

  • Virtual module import "nakshora" missing → plugin not registered in vite.config
  • HMR not updating CSS → ensure the plugin is inside plugins: [], not css.postcss

Next#

Styling patterns: concepts/utility-first-methodology|utility-first methodology · performance: performance/index|performance guide.