Home / File/ vite.config.js — vite Source File

vite.config.js — vite Source File

Architecture documentation for vite.config.js, a javascript file in the vite codebase. 4 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  0e69b1a7_9ef5_7c48_5b5c_fa1eabe6fdc4["vite.config.js"]
  860f2d3b_d84b_d8bc_3108_964e9bbcfba2["svgVirtualModulePlugin.ts"]
  0e69b1a7_9ef5_7c48_5b5c_fa1eabe6fdc4 --> 860f2d3b_d84b_d8bc_3108_964e9bbcfba2
  cd49bdc1_6b09_d016_492b_b4a76fddea59["svgVirtualModulePlugin"]
  0e69b1a7_9ef5_7c48_5b5c_fa1eabe6fdc4 --> cd49bdc1_6b09_d016_492b_b4a76fddea59
  51e96894_3556_ed5c_1ede_97d449867adf["node:path"]
  0e69b1a7_9ef5_7c48_5b5c_fa1eabe6fdc4 --> 51e96894_3556_ed5c_1ede_97d449867adf
  54c37fea_4fe7_2693_71cb_1276b77f55f9["vite"]
  0e69b1a7_9ef5_7c48_5b5c_fa1eabe6fdc4 --> 54c37fea_4fe7_2693_71cb_1276b77f55f9
  style 0e69b1a7_9ef5_7c48_5b5c_fa1eabe6fdc4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import path from 'node:path'
import { defineConfig } from 'vite'
import svgVirtualModulePlugin from './svgVirtualModulePlugin'

export default defineConfig({
  build: {
    rollupOptions: {
      input: {
        main: path.resolve(import.meta.dirname, 'src/index.html'),
      },
    },
  },
  server: {
    fs: {
      strict: true,
      allow: [path.resolve(import.meta.dirname, 'src')],
    },
    hmr: {
      overlay: false,
    },
    headers: {
      'x-served-by': 'vite',
    },
  },
  preview: {
    headers: {
      'x-served-by': 'vite',
    },
  },
  define: {
    ROOT: JSON.stringify(path.dirname(import.meta.dirname).replace(/\\/g, '/')),
  },
  plugins: [svgVirtualModulePlugin()],
})

Domain

Frequently Asked Questions

What does vite.config.js do?
vite.config.js is a source file in the vite codebase, written in javascript. It belongs to the ViteCore domain.
What does vite.config.js depend on?
vite.config.js imports 4 module(s): node:path, svgVirtualModulePlugin, svgVirtualModulePlugin.ts, vite.
Where is vite.config.js in the architecture?
vite.config.js is located at playground/fs-serve/root/vite.config.js (domain: ViteCore, directory: playground/fs-serve/root).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free