Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mix --production no work in project #32

Open
welitonjjosedev opened this issue Apr 14, 2021 · 3 comments
Open

mix --production no work in project #32

welitonjjosedev opened this issue Apr 14, 2021 · 3 comments

Comments

@welitonjjosedev
Copy link

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});
`

@mangcoding
Copy link

anyone solve this problem?
i found same issue here

@juloxrox
Copy link

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

@SlyDave
Copy link

SlyDave commented Aug 26, 2021

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});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants