It is likely an issue with your PostCSS plugin ordering.
require('postcss-purgecss-laravel') – it’s not needed.
- Remove the
postcss-loader you added – these will always be automatically installed/handled by Mix as needed. If you get an error message implying you should install them, something else is wrong.
require('autoprefixer') – Mix includes this automatically.
Try something simple like this:
mix.postCss('resources/styles/app.css', 'dist/styles', [
precss more or less includes the plugins you were otherwise requiring 1 by 1.
You’re also always free to take advantage of the many Mix extensions out there such as https://laravel-mix.com/extensions/tailwindcss
Oh – and make sure you remove the Bootstrap imports in your
app.css as they appear to be in your error log. FYI you do not have to use PostCSS with Tailwind – as someone who personally went down the PostCSS rabbit hole – I’d just stick with SCSS. Nested imports are too powerful to pass up.