Skip to content

Instantly share code, notes, and snippets.

@mattsandersuk
Created February 1, 2018 22:39
Show Gist options
  • Save mattsandersuk/1a81c268becac54865e566ad91ad6683 to your computer and use it in GitHub Desktop.
Save mattsandersuk/1a81c268becac54865e566ad91ad6683 to your computer and use it in GitHub Desktop.
Modified webpack config for Laravel Mix + Foundation.js compatibility
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| 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/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');
mix.webpackConfig({
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules(?!\/foundation-sites)|bower_components/,
use: [
{
loader: 'babel-loader',
options: Config.babel()
}
]
}
]
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment