forked from monicahq/monica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
46 lines (41 loc) · 1.12 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
let mix = require('laravel-mix');
require('laravel-mix-purgecss');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
mix.webpackConfig({
plugins: [
new MomentLocalesPlugin({
localesToKeep: [
'en',
'ar',
'de',
'en-GB',
'es',
'fr',
'he',
'it',
'nl',
'sv',
'tr',
'zh-CN',
'zh-TW',
],
}),
],
});
let purgeCssOptions = {
enabled: true,
whitelistPatterns: [/^autosuggest/, /^fa-/, /^vdp-datepicker/, /^StripeElement/, /^vgt/, /^vue-tooltip/, /^pretty/, /^sweet-/, /^vuejs-clipper-basic/, /^vs__/, /^sr-only/],
whitelistPatternsChildren: [/^vdp-datepicker/, /^vgt/, /^vue-tooltip/, /^pretty/, /^sweet-/, /^vs-/]
};
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app-ltr.scss', 'public/css')
.sass('resources/sass/app-rtl.scss', 'public/css')
// stripe
.js('resources/js/stripe.js', 'public/js')
.sass('resources/sass/stripe.scss', 'public/css')
// global commands
.purgeCss(purgeCssOptions)
.extract()
.setResourceRoot('../')
.sourceMaps(false)
.version();