forked from phpvms/phpvms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
149 lines (130 loc) · 4.41 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
'use strict';
const mix = require('laravel-mix');
/**
* COPY ASSETS
* Copy required assets
*/
mix.copy('node_modules/bootstrap3/fonts/*.woff2', 'public/assets/fonts/');
mix.copy('node_modules/bootstrap3/fonts/*.woff2', 'public/assets/admin/fonts/');
mix.copy('node_modules/x-editable/dist/bootstrap3-editable/img/*', 'public/assets/admin/img/');
mix.copy('node_modules/jquery/dist/jquery.js', 'public/assets/global/js/');
mix.copy('node_modules/flag-icon-css/flags/', 'public/assets/global/flags/');
/**
* DEFAULT SKIN FRONTEND FILES
*/
mix.sass('resources/sass/now-ui/now-ui-kit.scss',
'public/assets/frontend/css/now-ui-kit.css')
.options({
processCssUrls: false,
compressed: true
});
/**
* ADMIN REQUIRED FILES
*/
mix.sass('resources/sass/admin/paper-dashboard.scss',
'public/assets/admin/css/vendor.min.css')
.styles([
'node_modules/bootstrap3/dist/css/bootstrap.css',
'node_modules/animate.css/animate.css',
'node_modules/icheck/skins/square/blue.css',
'node_modules/select2/dist/css/select2.css',
'node_modules/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css',
'node_modules/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.css',
'public/assets/admin/css/vendor.min.css',
], 'public/assets/admin/css/vendor.css').version()
.options({
compressed: true
})
.sourceMaps();
mix.scripts([
'node_modules/lodash/lodash.js',
'node_modules/jquery/dist/jquery.js',
'node_modules/moment/moment.js',
//'node_modules/axios/dist/axios.js',
'node_modules/bootstrap3/dist/js/bootstrap.js',
'node_modules/bootstrap3/js/collapse.js',
'node_modules/bootstrap3/js/transition.js',
'node_modules/popper.js/dist/umd/popper.js',
'node_modules/popper.js/dist/umd/popper-utils.js',
'node_modules/select2/dist/js/select2.js',
//'node_modules/leaflet/dist/leaflet.js',
'node_modules/icheck/icheck.js',
'node_modules/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.js',
'node_modules/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js',
'node_modules/jquery-pjax/jquery.pjax.js',
'node_modues/paper-dashboard/assets/js/paper-dashboard.js',
], 'public/assets/admin/js/vendor.js');
mix.copy('node_modules/icheck/skins/square/blue*.png', 'public/assets/admin/css');
/**
* SYSTEM REQUIRED AND GLOBAL VENDOR FILES
*/
mix.scripts([
'node_modules/lodash/lodash.js',
//'node_modules/axios/dist/axios.js',
'node_modules/jquery/dist/jquery.js',
//'node_modules/bootstrap3/dist/js/bootstrap.js',
//'node_modules/popper.js/dist/umd/popper.js',
//'node_modules/popper.js/dist/umd/popper-utils.js',
'node_modules/select2/dist/js/select2.js',
//'node_modules/leaflet/dist/leaflet.js',
//'node_modules/pjax/pjax.js',
//'node_modules/leaflet-rotatedmarker/leaflet.rotatedMarker.js',
//'node_modules/Leaflet.Geodesic/Leaflet.Geodesic.js',
], 'public/assets/global/js/vendor.js');
mix.styles([
'node_modules/select2/dist/css/select2.css',
'node_modules/leaflet/dist/leaflet.css',
'node_modules/flag-icon-css/css/flag-icon.css',
], 'public/assets/global/css/vendor.css')
.options({
compressed: true
})
.sourceMaps();
/**
* INSTALLER VENDOR FILES
*/
mix.styles([
'node_modules/bootstrap3/dist/css/bootstrap.css',
'public/assets/frontend/css/now-ui-kit.css',
'node_modules/select2/dist/css/select2.css',
'node_modules/flag-icon-css/css/flag-icon.css',
], 'public/assets/installer/css/vendor.css')
.options({
processCssUrls: false,
compressed: true
})
.sourceMaps();
mix.scripts([
'node_modules/jquery/dist/jquery.js',
'node_modules/select2/dist/js/select2.js',
], 'public/assets/installer/js/vendor.js');
/**
* COMMON JS STUFF
*/
// These should go into the separate vendor.js file
const extract = [
'lodash',
'popper.js',
'jquery',
'select2',
'pjax',
'leaflet',
'Leaflet.Geodesic',
'leaflet-rotatedmarker'
];
mix.js('resources/js/frontend/app.js', 'public/assets/frontend/js/app.js');
mix.js('resources/js/installer/app.js', 'public/assets/installer/js/app.js');
mix.js('resources/js/admin/app.js', 'public/assets/admin/js/app.js');
mix.webpackConfig({
/*entry: {
admin: __dirname + "/resources/js/admin/app.js",
app: __dirname + "/resources/js/frontend/app.js",
},
output: {
filename: "[name].js",
path: __dirname + "/public/js/",
},*/
plugins: [
//new BundleAnalyzerPlugin()
]
});