@melmoniry try to add processCssUrls: false in your mix options.
Trouble with running tailwind
Hello, I've just installed tailwind using this documentation https://laravel.com/docs/8.x/mix#tailwindcss for some reason after running mix with tailwind, all my CSS that i already had is gone it becomes all words with no containers or anything. is there anything am missing? or it should behave this way?
note:- am using Laravel 8 PHP 8.1
all my CSS that i already had is gone it becomes all words with no containers or anything. is there anything am missing? or it should behave this way?
You are not missing anything. And this is the way Tailwind sets up the project. Reason Preflight
Upon installing Tailwind, Preflight removes all of the default margins from elements like headings, blockquotes, paragraphs, etc. That is why you are seeing all words with nocontainer or anything.
@tailwind base; /* Preflight will be injected here */
@tailwind components;
@tailwind utilities;
You can disable preflight:
// tailwind.config.js
module.exports = {
corePlugins: {
preflight: false,
}
}
Reason for setting up Preflight because each browsers have their own way of styling things. An input type text on Chrome will look different from Firefox, Opera and others. Preflight is a set of base styles for Tailwind projects that are designed to smooth over cross-browser inconsistencies and make it easier for you to work within the constraints of your design system.
I would suggest to update your old CSS to use Tailwind.
Please or to participate in this conversation.