Home / File/ entry-worker.jsx — vite Source File

entry-worker.jsx — vite Source File

Architecture documentation for entry-worker.jsx, a javascript file in the vite codebase. 5 imports, 0 dependents.

File javascript 5 imports

Entity Profile

Dependency Diagram

graph LR
  03172362_0db0_9d50_5ddd_c76c9039caeb["entry-worker.jsx"]
  ff3250c5_6ca5_941f_276f_6e9efc95f1c2["node:assert"]
  03172362_0db0_9d50_5ddd_c76c9039caeb --> ff3250c5_6ca5_941f_276f_6e9efc95f1c2
  bc9a4b13_261f_c15c_66a7_22e9cd809dbc["test-resolve-linked"]
  03172362_0db0_9d50_5ddd_c76c9039caeb --> bc9a4b13_261f_c15c_66a7_22e9cd809dbc
  8b9365db_4b4a_5ef1_72d4_3e5995e1302d["test-browser-exports"]
  03172362_0db0_9d50_5ddd_c76c9039caeb --> 8b9365db_4b4a_5ef1_72d4_3e5995e1302d
  960a289b_9f49_6379_414a_b8092a9960da["test-worker-exports"]
  03172362_0db0_9d50_5ddd_c76c9039caeb --> 960a289b_9f49_6379_414a_b8092a9960da
  16c08f9f_8e90_777b_a0bf_1b3f40a90ecd["react"]
  03172362_0db0_9d50_5ddd_c76c9039caeb --> 16c08f9f_8e90_777b_a0bf_1b3f40a90ecd
  style 03172362_0db0_9d50_5ddd_c76c9039caeb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import { equal } from 'node:assert'
import { msg as linkedMsg } from '@vitejs/test-resolve-linked'
import browserExportsMessage from '@vitejs/test-browser-exports'
import workerExportsMessage from '@vitejs/test-worker-exports'
import React from 'react'

let loaded = false
import('./dynamic').then(({ foo }) => {
  loaded = !!foo
})

addEventListener('fetch', function (event) {
  return event.respondWith(
    new Response(
      `
    <h1>hello from webworker</h1>
    <p class="linked">${linkedMsg}</p>
    <p class="external">${typeof React}</p>
    <p>dynamic: ${loaded}</p>
    <p class="browser-exports">${browserExportsMessage}</p>
    <p class="worker-exports">${workerExportsMessage}</p>
    <p class="nodejs-compat">${equal('a', 'a') || '[success] nodejs compat'}</p>
    `,
      {
        headers: {
          'content-type': 'text/html',
        },
      },
    ),
  )
})

Dependencies

  • node:assert
  • react
  • test-browser-exports
  • test-resolve-linked
  • test-worker-exports

Frequently Asked Questions

What does entry-worker.jsx do?
entry-worker.jsx is a source file in the vite codebase, written in javascript.
What does entry-worker.jsx depend on?
entry-worker.jsx imports 5 module(s): node:assert, react, test-browser-exports, test-resolve-linked, test-worker-exports.
Where is entry-worker.jsx in the architecture?
entry-worker.jsx is located at playground/ssr-webworker/src/entry-worker.jsx (directory: playground/ssr-webworker/src).

Analyze Your Own Codebase

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

Try Supermodel Free