Home / File/ css-postcss-plugins-different-dir.spec.ts — vite Source File

css-postcss-plugins-different-dir.spec.ts — vite Source File

Architecture documentation for css-postcss-plugins-different-dir.spec.ts, a typescript file in the vite codebase. 4 imports, 0 dependents.

File typescript 4 imports

Entity Profile

Dependency Diagram

graph LR
  c90f199f_bc63_a827_9143_6f2c58019c71["css-postcss-plugins-different-dir.spec.ts"]
  51e96894_3556_ed5c_1ede_97d449867adf["node:path"]
  c90f199f_bc63_a827_9143_6f2c58019c71 --> 51e96894_3556_ed5c_1ede_97d449867adf
  54c37fea_4fe7_2693_71cb_1276b77f55f9["vite"]
  c90f199f_bc63_a827_9143_6f2c58019c71 --> 54c37fea_4fe7_2693_71cb_1276b77f55f9
  a340ba46_b2b7_3048_3bb3_6907a74c8464["vitest"]
  c90f199f_bc63_a827_9143_6f2c58019c71 --> a340ba46_b2b7_3048_3bb3_6907a74c8464
  d3fd5575_295b_d6be_24dd_62d277645dc9["~utils"]
  c90f199f_bc63_a827_9143_6f2c58019c71 --> d3fd5575_295b_d6be_24dd_62d277645dc9
  style c90f199f_bc63_a827_9143_6f2c58019c71 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import path from 'node:path'
import { createServer } from 'vite'
import { expect, test } from 'vitest'
import { getBgColor, getColor, isServe, page, ports } from '~utils'

// Regression test for https://github.com/vitejs/vite/issues/4000
test.runIf(isServe)('postcss plugins in different dir', async () => {
  const port = ports['css/postcss-plugins-different-dir']
  const server = await createServer({
    root: path.join(import.meta.dirname, '..', '..', '..', 'tailwind'),
    logLevel: 'silent',
    server: {
      port,
      strictPort: true,
    },
    build: {
      // skip transpilation during tests to make it faster
      target: 'esnext',
    },
  })
  await server.listen()
  try {
    await page.goto(`http://localhost:${port}`)
    const tailwindStyle = page.locator('#tailwind-style')
    expect(await getBgColor(tailwindStyle)).toBe('oklch(0.936 0.032 17.717)')
    expect(await getColor(tailwindStyle)).toBe('rgb(136, 136, 136)')
  } finally {
    await server.close()
  }
})

Dependencies

  • node:path
  • vite
  • vitest
  • ~utils

Frequently Asked Questions

What does css-postcss-plugins-different-dir.spec.ts do?
css-postcss-plugins-different-dir.spec.ts is a source file in the vite codebase, written in typescript.
What does css-postcss-plugins-different-dir.spec.ts depend on?
css-postcss-plugins-different-dir.spec.ts imports 4 module(s): node:path, vite, vitest, ~utils.
Where is css-postcss-plugins-different-dir.spec.ts in the architecture?
css-postcss-plugins-different-dir.spec.ts is located at playground/css/__tests__/postcss-plugins-different-dir/css-postcss-plugins-different-dir.spec.ts (directory: playground/css/__tests__/postcss-plugins-different-dir).

Analyze Your Own Codebase

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

Try Supermodel Free