mending3's avatar

Laravel Mix: how to minify css file in development

How do I minify the css file both in dev and prod? Don't know how to code it on webpack.mix.js

0 likes
5 replies
Sinnbeck's avatar

Not sure that's possible without some direct manipulation of webpack. What's the use case? Maybe there is a better way

Sinnbeck's avatar

I don't have any projects running mix, but try this

npx mix watch --production
//or
npx mix --production watch 
mending3's avatar

@Sinnbeck this way, the vue app.js will be in production, will it? if it does, this is not what I want. what I want is to set the css is in prod while the js is still in dev

mending3's avatar

I just want to minify it. I don't see any difference between the dev and prod mode particularly on the css file

Sinnbeck's avatar

@mending3 don't see why it matters then except for making dev slower. But did you try my two suggestions?

Please or to participate in this conversation.