mercredi 7 août 2019

Laravel Autoprefixer not working within webpack

My style.css don't have css-prefix, when I run command npm run production. I'm using:

Laravel: 5.6.39 & Laravel-mix: 4.1.2

File webpack.mix.js:

mix.sass('resources/assets/sass/style.scss', 'public/css').options({
    postCss: [
       require('autoprefixer')({
          browsers: ['last 40 versions'],
             grid: true
          })
    ]
});

File style.scss

img {
   -webkit-transform: translate(-50%, -50%);
   -ms-transform: translate(-50%, -50%);
   transform: translate(-50%, -50%);
}

Output file style.css:

img{
   transform: translate(-50%,-50%)
}

How to add css-prefix to out file style.css?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire