-
Notifications
You must be signed in to change notification settings - Fork 83
/
webpack.mix.js
49 lines (45 loc) · 2.26 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
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| 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.
|
*/
var adminScripts = [
'node_modules/jquery/dist/jquery.min.js',
'node_modules/paper-dashboard-2/assets/js/core/jquery.min.js',
'node_modules/paper-dashboard-2/assets/js/plugins/perfect-scrollbar.jquery.min.js',
'node_modules/paper-dashboard-2/assets/js/plugins/chartjs.min.js',
'node_modules/paper-dashboard-2/assets/js/plugins/bootstrap-notify.js',
'node_modules/paper-dashboard-2/assets/js/paper-dashboard.min.js',
'node_modules/pickadate/lib/picker.js',
'node_modules/pickadate/lib/picker.time.js',
'node_modules/pickadate/lib/picker.date.js',
'resources/admin/js/set-ckeditor.js',
'public/js/admin.js',
'resources/admin/js/bs-tooltips.js',
'public/vendor/laravel-filemanager/js/lfm.js',
];
mix.webpackConfig({
resolve: {
alias: { 'picker': 'pickadate/lib/picker' }
},
}).js('resources/js/app.js', 'public/js')
.js('resources/admin/js/admin.js', 'public/js')
.copy('node_modules/@fortawesome/fontawesome-free/webfonts/**', 'public/fonts/font-awesome/', true)
.copy('node_modules/paper-dashboard-2/assets/fonts/**', 'public/fonts/nucleo/', true)
.copy('node_modules/datatables/media/js/jquery.dataTables.min.js', 'public/js/', true)
.copy('node_modules/ckeditor/config.js', 'public/js/ckeditor/config.js')
.copy('node_modules/ckeditor/styles.js', 'public/js/ckeditor/styles.js')
.copy('node_modules/ckeditor/contents.css', 'public/js/ckeditor/contents.css')
.copyDirectory('node_modules/ckeditor/skins', 'public/js/ckeditor/skins')
.copyDirectory('node_modules/ckeditor/lang', 'public/js/ckeditor/lang')
.copyDirectory('node_modules/ckeditor/plugins', 'public/js/ckeditor/plugins')
.sass('resources/sass/app.scss', 'public/css')
.sass('resources/admin/sass/admin.scss', 'public/css')
.scripts(adminScripts, 'public/js/admin.js')
.version();