ssr-resolve.spec.ts — vite Source File
Architecture documentation for ssr-resolve.spec.ts, a typescript file in the vite codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR f9084b22_ea28_2d04_0643_fd0921bcc88f["ssr-resolve.spec.ts"] 2dd48a01_733b_e717_9c4b_f4fe7eb42567["node:child_process"] f9084b22_ea28_2d04_0643_fd0921bcc88f --> 2dd48a01_733b_e717_9c4b_f4fe7eb42567 10809968_066c_58db_f8b4_cb0464da805e["node:util"] f9084b22_ea28_2d04_0643_fd0921bcc88f --> 10809968_066c_58db_f8b4_cb0464da805e a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"] f9084b22_ea28_2d04_0643_fd0921bcc88f --> a340ba46_b2b7_3048_3bb3_6907a74c8464 d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"] f9084b22_ea28_2d04_0643_fd0921bcc88f --> d3fd5575_295b_d6be_24dd_62d277645dc9 style f9084b22_ea28_2d04_0643_fd0921bcc88f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { execFile } from 'node:child_process'
import { promisify } from 'node:util'
import { expect, test } from 'vitest'
import { isBuild, readFile, testDir } from '~utils'
const execFileAsync = promisify(execFile)
test.runIf(isBuild)('correctly resolve entrypoints', async () => {
const contents = readFile('dist/main.mjs')
const _ = `['"]`
expect(contents).toMatch(
new RegExp(`from ${_}@vitejs/test-entries/dir/index.js${_}`),
)
expect(contents).toMatch(
new RegExp(`from ${_}@vitejs/test-entries/file.js${_}`),
)
expect(contents).toMatch(
new RegExp(`from ${_}@vitejs/test-resolve-pkg-exports/entry${_}`),
)
expect(contents).toMatch(
new RegExp(`from ${_}@vitejs/test-deep-import/foo/index.js${_}`),
)
// expect(contents).toMatch(
// new RegExp(`from ${_}@vitejs/test-deep-import/utils/bar.js${_}`),
// )
expect(contents).toMatch(new RegExp(`from ${_}@vitejs/test-module-sync${_}`))
await execFileAsync('node', [`${testDir}/dist/main.mjs`])
})
test.runIf(isBuild)(
'node builtins should not be bundled if not used',
async () => {
const contents = readFile('dist/main.mjs')
expect(contents).not.include(`node:url`)
},
)
Dependencies
- node:child_process
- node:util
- vitest
- ~utils
Source
Frequently Asked Questions
What does ssr-resolve.spec.ts do?
ssr-resolve.spec.ts is a source file in the vite codebase, written in typescript.
What does ssr-resolve.spec.ts depend on?
ssr-resolve.spec.ts imports 4 module(s): node:child_process, node:util, vitest, ~utils.
Where is ssr-resolve.spec.ts in the architecture?
ssr-resolve.spec.ts is located at playground/ssr-resolve/__tests__/ssr-resolve.spec.ts (directory: playground/ssr-resolve/__tests__).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free