css-modules.test.ts — tailwindcss Source File
Architecture documentation for css-modules.test.ts, a typescript file in the tailwindcss codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 7dbd8963_1b3c_86af_0e52_48958794ed9d["css-modules.test.ts"] 9ffd1dda_9675_c514_373d_0f4ab4648249["utils.ts"] 7dbd8963_1b3c_86af_0e52_48958794ed9d --> 9ffd1dda_9675_c514_373d_0f4ab4648249 f11e3be9_51f8_140b_68b0_f58ddd082595["test"] 7dbd8963_1b3c_86af_0e52_48958794ed9d --> f11e3be9_51f8_140b_68b0_f58ddd082595 696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"] 7dbd8963_1b3c_86af_0e52_48958794ed9d --> 696bd648_5f24_1b59_8e8b_7a97a692869e style 7dbd8963_1b3c_86af_0e52_48958794ed9d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { describe } from 'vitest'
import { css, html, test, ts, txt } from '../utils'
describe.each(['postcss', 'lightningcss'])('%s', (transformer) => {
test(
`dev mode`,
{
fs: {
'package.json': txt`
{
"type": "module",
"dependencies": {
"@tailwindcss/vite": "workspace:^",
"tailwindcss": "workspace:^"
},
"devDependencies": {
${transformer === 'lightningcss' ? `"lightningcss": "^1",` : ''}
"vite": "^7"
}
}
`,
'vite.config.ts': ts`
import tailwindcss from '@tailwindcss/vite'
import { defineConfig } from 'vite'
export default defineConfig({
css: ${transformer === 'postcss' ? '{}' : "{ transformer: 'lightningcss' }"},
build: { cssMinify: false },
plugins: [tailwindcss()],
})
`,
'index.html': html`
<head>
<script type="module" src="/src/component.ts"></script>
</head>
<body>
<div id="root" />
</body>
`,
'src/component.ts': ts`
import { foo } from './component.module.css'
let root = document.getElementById('root')
root.className = foo
root.innerText = 'Hello, world!'
`,
'src/component.module.css': css`
@import 'tailwindcss/utilities';
.foo {
@apply underline;
}
`,
},
},
async ({ exec, fs, expect }) => {
await exec(`pnpm vite build`)
let files = await fs.glob('dist/**/*.css')
expect(files).toHaveLength(1)
let [filename] = files[0]
await fs.expectFileToContain(filename, [/text-decoration-line: underline;/gi])
},
)
})
Domain
Source
Frequently Asked Questions
What does css-modules.test.ts do?
css-modules.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain.
What does css-modules.test.ts depend on?
css-modules.test.ts imports 3 module(s): test, utils.ts, vitest.
Where is css-modules.test.ts in the architecture?
css-modules.test.ts is located at integrations/vite/css-modules.test.ts (domain: OxideEngine, directory: integrations/vite).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free