-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.mix.frontend.js
39 lines (36 loc) · 1.7 KB
/
webpack.mix.frontend.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
35
36
37
38
39
const mix = require('laravel-mix');
const webpackConfigurations = require('./webpack.config');
/*
|--------------------------------------------------------------------------
| 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
.autoload({
'jquery': ['jQuery', 'jquery', '$']
})
.js('resources/frontend/js/boot.js', 'public/js')
.sass('resources/frontend/sass/boot.scss', 'public/css')
.js('resources/js/bootscript.js', 'public/js/bootscript.js')
.disableNotifications()
.webpackConfig(webpackConfigurations)
.copyDirectory('resources/icons', 'public/images/icon')
.copyDirectory('resources/img', 'public/images')
//core assets
.copy('node_modules/bootstrap/dist/js/bootstrap.min.js', 'public/core/bootstrap/js/bootstrap.min.js')
.copy('node_modules/bootstrap/dist/css/bootstrap.min.css', 'public/core/bootstrap/css/bootstrap.min.css')
.copy('node_modules/jquery/dist/jquery.min.js', 'public/core/jquery/js/jquery.min.js')
.copy('node_modules/@fortawesome/fontawesome-free/css/all.min.css', 'public/core/fontawesome/css/fontawesome.min.css')
.copy('node_modules/@fortawesome/fontawesome-free/js/all.min.js', 'public/core/fontawesome/js/fontawesome.min.js')
.copyDirectory('node_modules/@fortawesome/fontawesome-free/webfonts', 'public/core/fontawesome/webfonts');
if (mix.inProduction()) {
mix.version();
} else {
mix.webpackConfig({devtool: "source-map"})
.sourceMaps();
}