Could we see your tailwind.config.js file ? What version of tailwind are you using ?
I recommend you to checkout the Tailwind installation guide for Laravel.
Jan 24, 2022
13
Level 10
Webpack with PostCss npm run watch question
Hi All, I am currently using Laravel mix for my JS along with Postcss for tailwind. When I use npm run watch it works great unless I am adding a tailwind class that hasn't been loaded before (like w-[90vw] or any other custom tailwind value. Then I have to stop NPM run watch and rerun it (I'm guessing this causes postCss to run again?). This definitely slows down the process and I was wondering if there was any solution to have postCss always checking along with Laravel mix? Here is my webpack file.
const mix = require('laravel-mix');
mix.postCss("resources/css/app.css", "public/assets", [
require("tailwindcss"),
]);
mix.sass('resources/sass/app-create.scss', 'public/assets')
.sass('resources/sass/app-admin.scss', 'public/assets')
.sass('resources/sass/app-lite.scss', 'public/assets')
.js('resources/js/app.js', 'public/assets')
.extract(['vue'])
.webpackConfig({
output: {
chunkFilename: '[name].js?id=[chunkhash]',
}
})
.vue();
if (mix.inProduction()) {
mix.version();
}
Please or to participate in this conversation.