generated from zuramai/voler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
46 lines (44 loc) · 1.14 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');
const sidebarItems = require('./sidebar-items.json');
require('laravel-mix-purgecss');
require('laravel-mix-nunjucks')
mix.njk('src/*', 'dist/', {
data: {
web_title: "Voler Admin Dashboard",
sidebarItems
},
block: 'content',
// marked: null,
envOptions: {
noCache: true
},
manageEnv: (nunjucks) => {
nunjucks.addFilter('containString', function(str, containStr) {
if(str == undefined) return false;
return str.indexOf(containStr) >= 0
})
},
})
mix
.js("src/assets/js/app.js", "dist/assets/js")
.js("src/assets/js/main.js", "dist/assets/js")
.js("src/assets/js/feather-icons.js", "dist/assets/js")
.sass("src/assets/scss/app.scss", "dist/assets/css")
// .purgeCss({
// content: [
// "src/**/*.html",
// ],
// safelist: [
// /^dropdown-/,
// /^modal/,
// /^feather/,
// 'i',
// 'svg',
// ],
// enabled: true,
// })
.options({
processCssUrls: false
})
.sass("src/assets/scss/bootstrap.scss", "dist/assets/css")
.setPublicPath("dist");