-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.mix.js
46 lines (39 loc) · 1.05 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
const mix = require('laravel-mix');
require('dotenv').config({
path: '../../.env'
});
let resourceRoot = process.env.MIX_ADMINLTE_RESOURCE_ROOT || '/vendor/adminlte/';
const WebpackRTLPlugin = require('webpack-rtl-plugin');
mix.setPublicPath('./public');
mix.js('resources/assets/js/auth.js', 'public/js')
.js('resources/assets/js/admin-lte.js', 'public/js')
.js('resources/assets/js/laravel-adminlte.js', 'public/js')
.extract([
'lodash',
'jquery',
'bootstrap-sass',
'fastclick',
'jquery-slimscroll',
'admin-lte',
'sweetalert2',
], 'public/js/vendor.js')
.autoload({
jquery: ['$', 'jQuery', 'jquery', 'Vue'],
});
mix.sass('resources/assets/sass/auth.scss', 'public/css')
.sass('resources/assets/sass/admin-lte.scss', 'public/css')
.options({
processCssUrls: true,
imgLoaderOptions: {
enabled: false,
},
resourceRoot
});
mix.webpackConfig({
plugins: [
new WebpackRTLPlugin(),
],
});
if (mix.inProduction()) {
mix.version();
}