Skip to content

Instantly share code, notes, and snippets.

@urre
Created August 28, 2017 10:33
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save urre/3319920e694b821a2ad0e5a361fdbe4d to your computer and use it in GitHub Desktop.
Save urre/3319920e694b821a2ad0e5a361fdbe4d to your computer and use it in GitHub Desktop.
Laravel Mix with Stylelint and Browsersync
let mix = require('laravel-mix');
let StyleLintPlugin = require('stylelint-webpack-plugin');
mix.webpackConfig({
plugins: [
new StyleLintPlugin({
files: './assets/sass/**/*.scss',
configFile: './.stylelintrc'
}),
]
});
mix.disableNotifications();
mix
.js('./assets/js/app.js', './dist/js/app.js')
.sass('./assets/sass/main.scss', './dist/css/main.css')
.browserSync({
files: [
'./**/*.php',
'./views/**/*.php',
'./layouts/*',
'./partials/*',
'dist/js/**/*.js',
'dist/css/**/*.css'
],
proxy: 'example.dev',
notify: false
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment