laravel-mix-tailwind icon indicating copy to clipboard operation
laravel-mix-tailwind copied to clipboard

mix --production no work in project

Open welitonjjosedev opened this issue 3 years ago • 3 comments

hi guys..

in development the webpack works well, but when I run yarn production the css doesn't work.

Can someone help me?

`const mix = require('laravel-mix');

require('mix-tailwindcss');

mix .js('resources/js/app.js', 'public/prod/js') .postCss('resources/css/app.css', 'public/prod/css', [ require('tailwindcss')('./tailwind.config.js') ]) .tailwind() .vue({version: 3}); `

welitonjjosedev avatar Apr 14 '21 21:04 welitonjjosedev

anyone solve this problem? i found same issue here

mangcoding avatar Apr 30 '21 10:04 mangcoding

Hi guys, I encountered the same, somehow due to the purgeCss array in tailwind config. I just removed everything from there and I got the assets compiled and minimized correctly

juloxrox avatar Jun 25 '21 20:06 juloxrox

You appear to be double configuring tailwind by including it as a postCss plugin and calling tailwind() which does the same thing...? so in your instance this plugin isn't required. or you need to remove the plugin configuration from postCss

Either with this plugin:

const mix = require('laravel-mix');

require('mix-tailwindcss');

mix
.js('resources/js/app.js', 'public/prod/js')
.postCss('resources/css/app.css', 'public/prod/css')
.tailwind()
.vue({version: 3});

Or without

const mix = require('laravel-mix');

mix
.js('resources/js/app.js', 'public/prod/js')
.postCss('resources/css/app.css', 'public/prod/css', [
require('tailwindcss')('./tailwind.config.js')
])
.vue({version: 3});

SlyDave avatar Aug 26 '21 12:08 SlyDave