Search code examples
csslaravel-5webpacksassminify

Generate Minified CSS from SCSS from WEB PACK and Laravel 5.5.2


Todo :

  • Generate the minified CSS files from SCSS file using Web Pack
  • Is there any command which did that??.
    it's like when I compiled my SCSS it should generate the minified CSS

Solution

  • Did you take a look at Laravel mix? It is a wrapper around Webpack.

    Default Mix behavior minifies the css for you if you run npm run production. Is that enough to solve your problem? Otherwise, please be more specific in your question. And show us what you have tried. Put some effort in your question.

    https://laravel.com/docs/5.6/mix#working-with-stylesheets

    https://github.com/JeffreyWay/laravel-mix/issues/1295