Skip to content

Instantly share code, notes, and snippets.

@tomshaw
Created February 17, 2020 18:47
Show Gist options
  • Save tomshaw/0d713303e13231066cd3c267198bafbf to your computer and use it in GitHub Desktop.
Save tomshaw/0d713303e13231066cd3c267198bafbf to your computer and use it in GitHub Desktop.
Miscellaneous Laravel MIX configurations
/*
|--------------------------------------------------------------------------
| Tailwind configuration
|--------------------------------------------------------------------------
*/
const mix = require('laravel-mix');
const tailwindcss = require('tailwindcss')
mix.js('resources/frontend/scripts/app.js', 'public/js/app.js');
mix.sass('resources/frontend/styles/app.scss', 'public/css/app.css')
.options({
postCss: [
tailwindcss('./tailwind.config.js'),
]
})
/*
|--------------------------------------------------------------------------
| SCSS/PostCSS configuration
|--------------------------------------------------------------------------
*/
const mix = require('laravel-mix');
mix.sass('resources/frontend/styles/app.scss', 'public/css/app.css')
.options({
postCss: [
require('autoprefixer')({
browsers: ['last 2 versions'],
})
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment