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, 2 dependents.

File javascript ViteCore 3 imports 2 dependents

Entity Profile

Dependency Diagram

graph LR
  345057e2_c041_d1bb_68f7_9c5b33d24cfa["vite.config.js"]
  e6032fbc_44cf_58d6_868d_dd15106c18c5["node:fs"]
  345057e2_c041_d1bb_68f7_9c5b33d24cfa --> e6032fbc_44cf_58d6_868d_dd15106c18c5
  51e96894_3556_ed5c_1ede_97d449867adf["node:path"]
  345057e2_c041_d1bb_68f7_9c5b33d24cfa --> 51e96894_3556_ed5c_1ede_97d449867adf
  54c37fea_4fe7_2693_71cb_1276b77f55f9["vite"]
  345057e2_c041_d1bb_68f7_9c5b33d24cfa --> 54c37fea_4fe7_2693_71cb_1276b77f55f9
  961e6b70_89c1_81b3_1075_63cc114c300b["vite.nominify.config.js"]
  961e6b70_89c1_81b3_1075_63cc114c300b --> 345057e2_c041_d1bb_68f7_9c5b33d24cfa
  cc3df8d5_e23c_d6bc_7bdd_c4607fccd429["vite.terser.config.js"]
  cc3df8d5_e23c_d6bc_7bdd_c4607fccd429 --> 345057e2_c041_d1bb_68f7_9c5b33d24cfa
  style 345057e2_c041_d1bb_68f7_9c5b33d24cfa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

export default defineConfig({
  esbuild: {
    supported: {
      // Force esbuild inject helpers to test regex
      'object-rest-spread': false,
      'optional-chain': false,
    },
  },
  build: {
    // Force oxc inject helpers to test regex
    // - object rest spread
    // - optional chaining
    target: 'chrome46',
    rollupOptions: {
      output: {
        legalComments: 'inline',
        banner: `/*!\nMayLib\n*/`,
      },
    },
    lib: {
      entry: path.resolve(import.meta.dirname, 'src/main.js'),
      name: 'MyLib',
      formats: ['es', 'umd', 'iife'],
      fileName: 'my-lib-custom-filename',
    },
  },
  plugins: [
    {
      name: 'emit-index',
      generateBundle() {
        this.emitFile({
          type: 'asset',
          fileName: 'index.html',
          source: fs.readFileSync(
            path.resolve(import.meta.dirname, 'index.dist.html'),
            'utf-8',
          ),
        })
      },
    },
  ],
})

Domain

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. It belongs to the ViteCore domain.
What does vite.config.js depend on?
vite.config.js imports 3 module(s): node:fs, node:path, vite.
What files import vite.config.js?
vite.config.js is imported by 2 file(s): vite.nominify.config.js, vite.terser.config.js.
Where is vite.config.js in the architecture?
vite.config.js is located at playground/lib/vite.config.js (domain: ViteCore, directory: playground/lib).

Analyze Your Own Codebase

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

Try Supermodel Free