-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.mix.js
25 lines (22 loc) · 1.02 KB
/
webpack.mix.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const mix = require('laravel-mix');
const fs = require('fs');
/*
|--------------------------------------------------------------------------
| 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.
|
*/
if (!fs.existsSync('resources/fomantic/dist/semantic.css') || !fs.existsSync('resources/fomantic/dist/semantic.min.js')) {
console.error('Fomantic UI is not built, run `npx gulp build` in resources/semantic folder');
process.exit(1);
}
mix.js('resources/js/app.js', 'public/js')
.js('resources/js/err.js', 'public/js')
.extract(['vue', 'jquery', 'axios', 'lang.js', 'clipboard', 'cookie-universal', '@uppy/core', '@uppy/dashboard'])
.sass('resources/sass/app.scss', 'public/css')
.sass('resources/sass/err.scss', 'public/css')
.sourceMaps();