forked from cachethq/cachet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.mix.js
executable file
·75 lines (69 loc) · 2.36 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
let mix = require('laravel-mix');
require('laravel-mix-purgecss')
/*
|--------------------------------------------------------------------------
| 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.
|
*/
// Set sassOptions for external includePaths
mix.webpackConfig({
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
{
loader: 'sass-loader',
options: {
sassOptions: {
includePaths: ['./node_modules/'],
},
},
},
],
},
],
},
resolve: {
alias: {
vue: 'vue/dist/vue.js'
}
},
});
const sassOptions = {
includePaths: ['node_modules'],
};
mix
.copyDirectory('node_modules/ionicons/fonts', 'public/fonts')
.sass('resources/assets/sass/dashboard.scss', 'public/dist/css/dashboard')
.sass('resources/assets/sass/app.scss', 'public/dist/css')
.purgeCss()
.options({
processCssUrls: false
})
.js('resources/assets/js/app.js', 'public/dist/js').extract(['vue', 'chart.js'])
.scripts([
'public/dist/js/app.js',
'node_modules/es5-shim/es5-shim.js',
'node_modules/es5-shim/es5-sham.js',
'node_modules/jquery/dist/jquery.min.js',
'node_modules/bootstrap-sass/assets/javascripts/bootstrap.min.js',
'node_modules/moment/min/moment-with-locales.min.js',
'node_modules/lodash/lodash.min.js',
'node_modules/messenger/build/js/messenger.min.js',
'node_modules/sortablejs/Sortable.min.js',
'node_modules/jquery-minicolors/jquery.minicolors.min.js',
'node_modules/jquery-sparkline/jquery.sparkline.min.js',
'node_modules/sweetalert2/dist/sweetalert2.min.js',
'node_modules/livestamp/livestamp.js',
'node_modules/jquery-serializeobject/jquery.serializeObject.js',
'resources/assets/js/cachet.js',
], 'public/dist/js/all.js')
if (mix.inProduction()) {
mix.version();
}