forked from nasirkhan/laravel-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
79 lines (67 loc) · 2 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
71
72
73
74
75
76
77
78
79
const mix = require('laravel-mix');
mix.js('resources/js/app.js', 'public/js')
.postCss('resources/css/app.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
]
);
/**
*
* Copy Assets
*
* -----------------------------------------------------------------------------
*/
// jquery and icon fonts
mix.copy("node_modules/jquery/dist/jquery.min.js", "public/js/jquery.min.js")
.copy("node_modules/@fortawesome/fontawesome-free/webfonts/*", "public/webfonts")
.copy('node_modules/@coreui/icons/fonts', 'public/fonts')
.copy('node_modules/@coreui/icons/sprites', 'public/fonts');
/**
*
* Frontend
*
* -----------------------------------------------------------------------------
*/
mix.js('resources/js/frontend.js', 'public/js')
.postCss('resources/css/frontend.css', 'public/css', [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
]
);
/**
*
* Backend
*
* -----------------------------------------------------------------------------
*/
// Build Backend SASS
mix.sass("resources/sass/backend.scss", "public/css/backend-theme.css");
// Backend CSS
mix.styles(
[
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"node_modules/@coreui/icons/css/all.css",
"node_modules/simplebar/dist/simplebar.css",
// "resources/vendors/coreui/dist/css/style.min.css",
"public/css/backend-theme.css",
],
"public/css/backend.css"
);
// Backend JS
mix.scripts(
[
"node_modules/jquery/dist/jquery.min.js",
// "node_modules/bootstrap/dist/js/bootstrap.min.js",
"node_modules/@coreui/coreui/dist/js/coreui.bundle.js",
"node_modules/simplebar/dist/simplebar.min.js",
// "node_modules/@coreui/utils/dist/coreui-utils.js",
"resources/js/laravel.js",
"resources/js/backend-custom.js"
],
"public/js/backend.js"
);
if (mix.inProduction()) {
mix.version();
}