Home / Function/ toOutputFilePathInJSForBundledDev() — vite Function Reference

toOutputFilePathInJSForBundledDev() — vite Function Reference

Architecture documentation for the toOutputFilePathInJSForBundledDev() function in asset.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  b8f7857f_eb38_9730_a8eb_658b77a590c9["toOutputFilePathInJSForBundledDev()"]
  e71b94ef_3010_e358_13d8_f3b3acb0a268["asset.ts"]
  b8f7857f_eb38_9730_a8eb_658b77a590c9 -->|defined in| e71b94ef_3010_e358_13d8_f3b3acb0a268
  86195de2_9c12_1f7e_7a3e_0754a5695ebe["fileToBuiltUrl()"]
  86195de2_9c12_1f7e_7a3e_0754a5695ebe -->|calls| b8f7857f_eb38_9730_a8eb_658b77a590c9
  1a156a4f_5015_f60f_3a54_6eb2168861ca["webWorkerPlugin()"]
  1a156a4f_5015_f60f_3a54_6eb2168861ca -->|calls| b8f7857f_eb38_9730_a8eb_658b77a590c9
  cc381763_acbd_6aeb_4970_907e43d5b95f["workerImportMetaUrlPlugin()"]
  cc381763_acbd_6aeb_4970_907e43d5b95f -->|calls| b8f7857f_eb38_9730_a8eb_658b77a590c9
  0b9e0d55_d22c_da82_ca1d_a2e7d0af1d66["toOutputFilePathInJS()"]
  b8f7857f_eb38_9730_a8eb_658b77a590c9 -->|calls| 0b9e0d55_d22c_da82_ca1d_a2e7d0af1d66
  style b8f7857f_eb38_9730_a8eb_658b77a590c9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/plugins/asset.ts lines 490–509

export function toOutputFilePathInJSForBundledDev(
  environment: PartialEnvironment,
  filename: string,
): string {
  const outputUrl = toOutputFilePathInJS(
    environment,
    filename,
    'asset',
    // in bundled dev, the chunks are always emitted to `assets` directory
    'assets/dummy.js',
    'js',
    // relative base is not supported in bundled dev
    () => {
      throw new Error('unreachable')
    },
  )
  // renderBuiltUrl is not supported in bundled dev
  if (typeof outputUrl === 'object') throw new Error('unreachable')
  return outputUrl
}

Domain

Subdomains

Frequently Asked Questions

What does toOutputFilePathInJSForBundledDev() do?
toOutputFilePathInJSForBundledDev() is a function in the vite codebase, defined in packages/vite/src/node/plugins/asset.ts.
Where is toOutputFilePathInJSForBundledDev() defined?
toOutputFilePathInJSForBundledDev() is defined in packages/vite/src/node/plugins/asset.ts at line 490.
What does toOutputFilePathInJSForBundledDev() call?
toOutputFilePathInJSForBundledDev() calls 1 function(s): toOutputFilePathInJS.
What calls toOutputFilePathInJSForBundledDev()?
toOutputFilePathInJSForBundledDev() is called by 3 function(s): fileToBuiltUrl, webWorkerPlugin, workerImportMetaUrlPlugin.

Analyze Your Own Codebase

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

Try Supermodel Free