worker.js — vite Source File
Architecture documentation for worker.js, a javascript file in the vite codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 535629ca_edbf_7594_a456_39f4ffa46efd["worker.js"] 51e96894_3556_ed5c_1ede_97d449867adf["node:path"] 535629ca_edbf_7594_a456_39f4ffa46efd --> 51e96894_3556_ed5c_1ede_97d449867adf 6da82ba9_1ca2_4523_fe82_867aca00d998["miniflare"] 535629ca_edbf_7594_a456_39f4ffa46efd --> 6da82ba9_1ca2_4523_fe82_867aca00d998 style 535629ca_edbf_7594_a456_39f4ffa46efd fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import path from 'node:path'
import { Miniflare } from 'miniflare'
const isTest = !!process.env.TEST
export async function createServer(port) {
const mf = new Miniflare({
scriptPath: path.resolve(
import.meta.dirname,
'dist/worker/entry-worker.js',
),
port,
modules: true,
compatibilityFlags: ['nodejs_compat'],
})
await mf.ready
return { mf }
}
if (!isTest) {
createServer(5173).then(() => console.log('http://localhost:5173'))
}
Domain
Subdomains
Functions
Dependencies
- miniflare
- node:path
Source
Frequently Asked Questions
What does worker.js do?
worker.js is a source file in the vite codebase, written in javascript. It belongs to the ViteCore domain, DevServer subdomain.
What functions are defined in worker.js?
worker.js defines 1 function(s): createServer.
What does worker.js depend on?
worker.js imports 2 module(s): miniflare, node:path.
Where is worker.js in the architecture?
worker.js is located at playground/ssr-webworker/worker.js (domain: ViteCore, subdomain: DevServer, directory: playground/ssr-webworker).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free