Last active
October 22, 2019 20:56
-
-
Save RuslanHolovko/a8113feb32524f41601b3b75fd70cdf3 to your computer and use it in GitHub Desktop.
laravel webpack mix config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mix = require('laravel-mix'); | |
require('laravel-mix-polyfill'); | |
/* | |
|-------------------------------------------------------------------------- | |
| Mix Asset Management | |
|-------------------------------------------------------------------------- | |
| | |
| Mix provides a clean, fluent API for defining some Webpack build steps | |
| for your Laravel application. By default, we are compiling the Sass | |
| file for the application as well as bundling up all the JS files. | |
| | |
*/ | |
mix.js('resources/js/app.js', 'public/js') | |
.sass('resources/sass/app.sass', 'public/css') | |
.options({ | |
autoprefixer: { | |
options: { | |
overrideBrowserslist: ['last 20 versions'], | |
cascade: false | |
} | |
} | |
}) | |
.polyfill({ | |
enabled: true, | |
useBuiltIns: "usage", | |
targets: {"firefox": "50", "ie": 11} | |
}); | |
// or | |
mix.sass('resources/sass/app.sass', 'public/css').options({ | |
postCss: [ | |
require('autoprefixer')({ | |
browsers: [ | |
'last 20 versions', | |
'iOS >= 8', | |
'Safari >= 8', | |
], | |
cascade: false, | |
flexbox: "no-2009" | |
}), | |
] | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment