-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
55 lines (49 loc) · 1.21 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
const mix = require('laravel-mix')
require('./webpack.config')
require('laravel-mix-purgecss')
require('laravel-mix-copy-watched')
require('laravel-mix-tailwind')
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your application.
|
*/
mix.sass('assets/sass/app.scss', 'css')
.sass('assets/sass/dashboard.scss', 'css')
.js('assets/js/app.js', 'js')
.js('assets/js/dashboard.js', 'js')
.tailwind('./tailwind.config.js')
mix.extract(['jquery'], 'js/vendor/jquery.js')
.extract(['vue'], 'js/vendor/vue.js')
.extract([
'axios',
'lodash',
'moment',
'moment-timezone',
'moment/locale/id'
], 'js/vendor/common.js')
mix.browserSync({
proxy: process.env.APP_URL,
files: ['./']
})
.purgeCss({
globs: [
'./assets/js/*.js',
'./assets/js/*.jsx',
'./assets/js/*.vue',
'./**/*.html',
'./**/*.py'
],
whitelistPatterns: [
/-active$/,
/-enter$/,
/-leave-to$/
]
})
if (mix.inProduction()) {
mix.version()
}