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. 3 imports, 0 dependents.

File javascript 3 imports

Entity Profile

Dependency Diagram

graph LR
  74a9dbee_a4bd_047f_6052_465fcbdba5d8["vite.config.js"]
  e6032fbc_44cf_58d6_868d_dd15106c18c5["node:fs"]
  74a9dbee_a4bd_047f_6052_465fcbdba5d8 --> e6032fbc_44cf_58d6_868d_dd15106c18c5
  51e96894_3556_ed5c_1ede_97d449867adf["node:path"]
  74a9dbee_a4bd_047f_6052_465fcbdba5d8 --> 51e96894_3556_ed5c_1ede_97d449867adf
  54c37fea_4fe7_2693_71cb_1276b77f55f9["vite"]
  74a9dbee_a4bd_047f_6052_465fcbdba5d8 --> 54c37fea_4fe7_2693_71cb_1276b77f55f9
  style 74a9dbee_a4bd_047f_6052_465fcbdba5d8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import fs from 'node:fs'
import path from 'node:path'
import { defineConfig } from 'vite'

const dirname = import.meta.dirname

export default defineConfig({
  plugins: [
    {
      name: 'copy',
      writeBundle() {
        fs.mkdirSync(path.resolve(dirname, 'dist/views'))
        fs.mkdirSync(path.resolve(dirname, 'dist/files'))
        fs.copyFileSync(
          path.resolve(dirname, 'views/qux.js'),
          path.resolve(dirname, 'dist/views/qux.js'),
        )
        fs.copyFileSync(
          path.resolve(dirname, 'files/mxd.js'),
          path.resolve(dirname, 'dist/files/mxd.js'),
        )
        fs.copyFileSync(
          path.resolve(dirname, 'files/mxd.json'),
          path.resolve(dirname, 'dist/files/mxd.json'),
        )
      },
    },
  ],
  resolve: {
    alias: {
      '@': path.resolve(dirname, 'alias'),
    },
  },
  build: {
    sourcemap: true,
  },
})

Dependencies

  • node:fs
  • node:path
  • vite

Frequently Asked Questions

What does vite.config.js do?
vite.config.js is a source file in the vite codebase, written in javascript.
What does vite.config.js depend on?
vite.config.js imports 3 module(s): node:fs, node:path, vite.
Where is vite.config.js in the architecture?
vite.config.js is located at playground/dynamic-import/vite.config.js (directory: playground/dynamic-import).

Analyze Your Own Codebase

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

Try Supermodel Free