Skip to content

Commit 5ff29e5

Browse files
committed
Special-case v0 container plugin
1 parent 456c758 commit 5ff29e5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/class-names/getPlugins.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import pkgUp from 'pkg-up'
44
import { isObject } from './isObject'
55
import resolveFrom from 'resolve-from'
66
import importFrom from 'import-from'
7+
import normalizePath from 'normalize-path'
78

89
export async function getBuiltInPlugins({ cwd, resolvedConfig }) {
910
const tailwindBase = path.dirname(
@@ -77,6 +78,20 @@ export default function getPlugins(config) {
7778
}
7879
}
7980
if (pkg.name) {
81+
if (
82+
pkg.name === 'tailwindcss' &&
83+
/node_modules\/tailwindcss\/lib\/plugins\/container\.js$/.test(
84+
normalizePath(file)
85+
)
86+
) {
87+
return {
88+
name: 'tailwindcss/plugins/container',
89+
description:
90+
"A component for fixing an element's width to the current breakpoint.",
91+
homepage: 'https://tailwindcss-v0.netlify.app/docs/container/',
92+
version: pkg.version,
93+
}
94+
}
8095
return {
8196
name: pkg.name,
8297
description: pkg.description,

0 commit comments

Comments
 (0)