veslx 0.1.38 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/plugin/src/plugin.ts
CHANGED
|
@@ -348,9 +348,10 @@ export default function contentPlugin(contentDir: string, config?: VeslxConfig,
|
|
|
348
348
|
// This enables Tailwind v4 to scan the user's content directory for classes
|
|
349
349
|
transform(code, id) {
|
|
350
350
|
if (id.endsWith('/src/index.css') && code.includes("@import 'tailwindcss'")) {
|
|
351
|
-
// Use absolute path for @source directive
|
|
351
|
+
// Use absolute path with glob pattern for @source directive
|
|
352
|
+
// Must include all file types that may contain Tailwind classes
|
|
352
353
|
const absoluteContentDir = dir.replace(/\\/g, '/')
|
|
353
|
-
const sourceDirective = `@source "${absoluteContentDir}";`
|
|
354
|
+
const sourceDirective = `@source "${absoluteContentDir}/**/*.{html,js,jsx,ts,tsx,mdx,md,vue,svelte}";`
|
|
354
355
|
|
|
355
356
|
// Inject @source directive after the tailwindcss import
|
|
356
357
|
const modified = code.replace(
|