core-as-postcss-plugin.test.ts — tailwindcss Source File
Architecture documentation for core-as-postcss-plugin.test.ts, a typescript file in the tailwindcss codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 02a5f0c2_f95e_a8d2_1df4_6e7d7ad917e4["core-as-postcss-plugin.test.ts"] 9ffd1dda_9675_c514_373d_0f4ab4648249["utils.ts"] 02a5f0c2_f95e_a8d2_1df4_6e7d7ad917e4 --> 9ffd1dda_9675_c514_373d_0f4ab4648249 f11e3be9_51f8_140b_68b0_f58ddd082595["test"] 02a5f0c2_f95e_a8d2_1df4_6e7d7ad917e4 --> f11e3be9_51f8_140b_68b0_f58ddd082595 696bd648_5f24_1b59_8e8b_7a97a692869e["vitest"] 02a5f0c2_f95e_a8d2_1df4_6e7d7ad917e4 --> 696bd648_5f24_1b59_8e8b_7a97a692869e style 02a5f0c2_f95e_a8d2_1df4_6e7d7ad917e4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { describe } from 'vitest'
import { css, js, json, test } from '../utils'
const variantConfig = {
string: {
'postcss.config.js': js`
module.exports = {
plugins: {
tailwindcss: {},
},
}
`,
},
ESM: {
'postcss.config.mjs': js`
import tailwindcss from 'tailwindcss'
export default {
plugins: [tailwindcss()],
}
`,
},
CJS: {
'postcss.config.cjs': js`
let tailwindcss = require('tailwindcss')
module.exports = {
plugins: [tailwindcss()],
}
`,
},
}
describe.each(Object.keys(variantConfig))('%s', (variant) => {
test(
`can not use \`tailwindcss\` as a postcss module`,
{
fs: {
...variantConfig[variant],
'package.json': json`
{
"dependencies": {
"postcss": "^8",
"postcss-cli": "^10",
"tailwindcss": "workspace:^"
}
}
`,
'src/index.css': css`@import 'tailwindcss';`,
},
},
async ({ exec, expect }) => {
await expect(
exec('pnpm postcss src/index.css --output dist/out.css', undefined, { ignoreStdErr: true }),
).rejects.toThrowError(
`It looks like you're trying to use \`tailwindcss\` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install \`@tailwindcss/postcss\` and update your PostCSS configuration.`,
)
},
)
})
Domain
Source
Frequently Asked Questions
What does core-as-postcss-plugin.test.ts do?
core-as-postcss-plugin.test.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the OxideEngine domain.
What does core-as-postcss-plugin.test.ts depend on?
core-as-postcss-plugin.test.ts imports 3 module(s): test, utils.ts, vitest.
Where is core-as-postcss-plugin.test.ts in the architecture?
core-as-postcss-plugin.test.ts is located at integrations/postcss/core-as-postcss-plugin.test.ts (domain: OxideEngine, directory: integrations/postcss).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free