Skip to content

Instantly share code, notes, and snippets.

@artlili
Created May 16, 2019 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artlili/dc58206725559667b5b4bc4c60d8f769 to your computer and use it in GitHub Desktop.
Save artlili/dc58206725559667b5b4bc4c60d8f769 to your computer and use it in GitHub Desktop.
laravel webpack mix
let mix = require('laravel-mix');
const path = require('path')
/*
|--------------------------------------------------------------------------
| 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')
.webpackConfig({
resolve:{
alias:{
'@': path.resolve('resources/assets/sass'),
'@js': path.resolve('resources/assets/js')
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment