-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.mix.js
70 lines (64 loc) · 2.07 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
const mix = require('laravel-mix');
const MixGlob = require("laravel-mix-glob")
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel applications. By default, we are compiling the CSS
| file for the application as well as bundling up all the JS files.
|
*/
// Create MixGlob instance
const mixGlob = new MixGlob({ mix })
// Modules and extensions
// * Not Supported pnpm
// const modulesToCopy = {
// "@icon/dripicons": false,
// "@fortawesome/fontawesome-free": false,
// "rater-js": false,
// "bootstrap-icons": false,
// apexcharts: true,
// "perfect-scrollbar": true,
// filepond: true,
// "filepond-plugin-image-preview": true,
// "feather-icons": true,
// dragula: true,
// dayjs: false,
// "chart.js": true,
// "choices.js": false,
// parsleyjs: true,
// sweetalert2: true,
// summernote: true,
// jquery: true,
// quill: true,
// tinymce: false,
// "toastify-js": false,
// "datatables.net-bs5": false,
// "simple-datatables": true, // With dist folder = true
// }
// for (const mod in modulesToCopy) {
// let modulePath = `node_modules/${mod}`
// if (modulesToCopy[mod]) modulePath += "/public"
//
// mix.copy(modulePath, `public/extensions/${mod}`)
// }
mixGlob
.sass("resources/sass/app.scss", "public/css")
.sass("resources/sass/themes/dark/app-dark.scss", "public/css")
.sass("resources/sass/pages/*.scss", "public/css/pages")
.sass("resources/sass/widgets/*.scss", "public/css/widgets")
.sass("resources/sass/iconly.scss", "public/css/shared")
.js("resources/js/*.js", "public/js")
// Copying assets
mix
.copy("resources/images", "public/images")
.copy(
"node_modules/bootstrap-icons/bootstrap-icons.svg",
"public/images"
)
.copy("resources/js/pages", "public/js/pages")
if (mix.inProduction()) {
mix.version();
}