Tailwind-CSS-not-detecting-classes-in-Vue-components-from-npm-package-sp835 Tailwind Templates

Tailwind Css Not Detecting Classes In Vue Components From Npm Package Sp835

Tailwind CSS is not detecting classes in Vue components from a npm package. The content array in the Tailwind config is missing the path to Vue components.

Tailwind CSS Not Detecting Classes in Vue Components from npm Package

This repository demonstrates a common issue when using Tailwind CSS with Vue components imported from an npm package. Tailwind may fail to detect and apply the classes defined in those components. This is usually because the content option in your tailwind.config.js file doesn't include the correct paths to those components.

Problem

The tailwind.config.js file is missing the necessary path for Tailwind to properly scan the Vue components. This results in classes not being applied correctly.

Solution

The solution lies in correctly configuring the content array in tailwind.config.js. The updated config includes the specific path to the Vue components within the npm package.

Top categories

Loading Svelte Themes