Skip to content

Instantly share code, notes, and snippets.

@tofikhidayatxyz
Created September 2, 2020 14:46
Show Gist options
  • Save tofikhidayatxyz/8c94eca6840940a7dddc7180b8ae683a to your computer and use it in GitHub Desktop.
Save tofikhidayatxyz/8c94eca6840940a7dddc7180b8ae683a to your computer and use it in GitHub Desktop.
Simpe laravelmix config for auto prefixer
let mix = require('laravel-mix');
require('laravel-mix-purgecss');
require('laravel-mix-polyfill');
const path = require('path')
mix.options({
processCssUrls: false, // enable this if need auto process css url
postCss: [
require('autoprefixer')({
cascade: false,
grid: true,
})
]
})
mix.polyfill({
enabled: true,
useBuiltIns: 'usage',
corejs: 3,
targets: {
'firefox': 50,
'ie': 11,
}
});
{
"browserslist": [
"> 1%",
"last 40 versions"
],
"devDependencies": {
"laravel-mix-polyfill": "^2.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment