-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.mix.backend.js
34 lines (29 loc) · 1.1 KB
/
webpack.mix.backend.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
26
27
28
29
30
31
32
33
34
const { mix } = require('laravel-mix');
const cpx = require('cpx');
/*
|--------------------------------------------------------------------------
| 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.setPublicPath(path.normalize('public/backend'))
.js('resources/assets/admin/js/admin.js', 'js')
.sass('resources/assets/admin/sass/admin.scss', 'css')
.js('resources/assets/admin/js/editor.js', 'js')
.sass('resources/assets/admin/sass/editor.scss', 'css');
// Vendor extraction
mix.extract(['lodash', 'jquery', 'materialize-css', 'vue', 'axios']);
if (!mix.inProduction()) {
mix.sourceMaps();
} else {
mix.version();
}
mix.then(() => {
cpx.copy('node_modules/simplemde/dist/simplemde.min.css', 'public/css');
cpx.copy('node_modules/simplemde/dist/simplemde.min.js', 'public/js');
});
mix.browserSync('indigo.test');