vite.config.js — vite Source File
Architecture documentation for vite.config.js, a javascript file in the vite codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 750a0088_d379_3910_70bc_3b12b86b43ac["vite.config.js"] 54c37fea_4fe7_2693_71cb_1276b77f55f9["vite"] 750a0088_d379_3910_70bc_3b12b86b43ac --> 54c37fea_4fe7_2693_71cb_1276b77f55f9 style 750a0088_d379_3910_70bc_3b12b86b43ac fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { defineConfig } from 'vite'
const timeout = (ms) => new Promise((r) => setTimeout(r, ms))
export default defineConfig({
server: {
port: 9606,
proxy: {
'/nonExistentApp': {
target: 'http://localhost:9607',
bypass: () => {
return false
},
},
'/asyncResponse': {
bypass: async (_, res) => {
await timeout(4)
res.writeHead(200, {
'Content-Type': 'text/plain',
})
res.end('Hello after 4 ms (async timeout)')
return '/asyncResponse'
},
},
'/asyncThrowingError': {
bypass: async () => {
await timeout(4)
throw new Error('bypass error')
},
},
},
},
plugins: [
{
name: 'handle-error-in-preview',
configurePreviewServer({ config, middlewares }) {
return () => {
middlewares.use((err, _req, res, _next) => {
config.logger.error(err.message, { error: err })
res.statusCode = 500
res.end()
})
}
},
},
],
})
Domain
Subdomains
Functions
Dependencies
- vite
Source
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, ConfigEngine subdomain.
What functions are defined in vite.config.js?
vite.config.js defines 1 function(s): timeout.
What does vite.config.js depend on?
vite.config.js imports 1 module(s): vite.
Where is vite.config.js in the architecture?
vite.config.js is located at playground/proxy-bypass/vite.config.js (domain: ViteCore, subdomain: ConfigEngine, directory: playground/proxy-bypass).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free