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

Entity Profile

Dependency Diagram

graph LR
  446f618c_4534_006f_d231_e5da67c68c53["vite.config.js"]
  fa6ef7e9_30f9_8e01_a71f_c84fe1d37fab["foo-with-sourcemap-plugin.ts"]
  446f618c_4534_006f_d231_e5da67c68c53 --> fa6ef7e9_30f9_8e01_a71f_c84fe1d37fab
  9ef0654a_2956_c297_dee0_e22e29db477f["transformFooWithInlineSourceMap"]
  446f618c_4534_006f_d231_e5da67c68c53 --> 9ef0654a_2956_c297_dee0_e22e29db477f
  a82ebd23_6b79_17ae_d2be_bc45ae15984b["zoo-with-sourcemap-plugin.ts"]
  446f618c_4534_006f_d231_e5da67c68c53 --> a82ebd23_6b79_17ae_d2be_bc45ae15984b
  24bf9ea4_a3d2_700a_83c0_f491e4719b27["transformZooWithSourcemapPlugin"]
  446f618c_4534_006f_d231_e5da67c68c53 --> 24bf9ea4_a3d2_700a_83c0_f491e4719b27
  54c37fea_4fe7_2693_71cb_1276b77f55f9["vite"]
  446f618c_4534_006f_d231_e5da67c68c53 --> 54c37fea_4fe7_2693_71cb_1276b77f55f9
  style 446f618c_4534_006f_d231_e5da67c68c53 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { defineConfig } from 'vite'
import transformFooWithInlineSourceMap from './foo-with-sourcemap-plugin'
import { transformZooWithSourcemapPlugin } from './zoo-with-sourcemap-plugin'

export default defineConfig({
  plugins: [
    transformFooWithInlineSourceMap(),
    transformZooWithSourcemapPlugin(),
  ],
  build: {
    sourcemap: true,
    rollupOptions: {
      output: {
        // manualChunks(name) {
        //   if (name.endsWith('after-preload-dynamic.js')) {
        //     return 'after-preload-dynamic'
        //   }
        //   if (name.endsWith('after-preload-dynamic-hashbang.js')) {
        //     return 'after-preload-dynamic-hashbang'
        //   }
        //   if (name.endsWith('after-preload-dynamic-no-dep.js')) {
        //     return 'after-preload-dynamic-no-dep'
        //   }
        //   if (name.includes('with-define-object')) {
        //     return 'with-define-object'
        //   }
        // },
        codeSplitting: {
          groups: [
            { name: 'after-preload-dynamic', test: 'after-preload-dynamic.js' },
            {
              name: 'after-preload-dynamic-hashbang',
              test: 'after-preload-dynamic-hashbang.js',
            },
            {
              name: 'after-preload-dynamic-no-dep',
              test: 'after-preload-dynamic-no-dep.js',
            },
            { name: 'with-define-object', test: 'with-define-object' },
          ],
        },
        banner(chunk) {
          if (chunk.name.endsWith('after-preload-dynamic-hashbang')) {
            return '#!/usr/bin/env node'
          }
        },
        sourcemapDebugIds: true,
      },
    },
  },
  define: {
    __testDefineObject: '{ "hello": "test" }',
  },
})

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 5 module(s): foo-with-sourcemap-plugin.ts, transformFooWithInlineSourceMap, transformZooWithSourcemapPlugin, vite, zoo-with-sourcemap-plugin.ts.
Where is vite.config.js in the architecture?
vite.config.js is located at playground/js-sourcemap/vite.config.js (domain: ViteCore, directory: playground/js-sourcemap).

Analyze Your Own Codebase

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

Try Supermodel Free