forked from monicahq/monica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
34 lines (28 loc) · 1.03 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
let mix = require('laravel-mix');
require('laravel-mix-purgecss');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
mix.webpackConfig({
plugins: [
new MomentLocalesPlugin({
localesToKeep: ['en', 'ar', 'cs', 'de', 'es', 'fr', 'he', 'hr', 'it', 'nl', 'pt', 'pt-BR', 'ru', 'tr', 'zh-cn'],
}),
],
});
let purgeCssOptions = {
whitelistPatterns: [/^vdp-datepicker/, /^StripeElement/, /^vgt/],
whitelistPatternsChildren: [/^vdp-datepicker/, /^vgt/]
};
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app-ltr.scss', 'public/css')
.sass('resources/assets/sass/app-rtl.scss', 'public/css')
// stripe
.js('resources/assets/js/stripe.js', 'public/js')
.sass('resources/assets/sass/stripe.scss', 'public/css')
// u2f
.scripts(['resources/assets/js/vendor/u2f/u2f-api.js'], 'public/js/u2f-api.js')
// global commands
.purgeCss(purgeCssOptions)
.extract()
.setResourceRoot('../')
.sourceMaps(false)
.version();