forked from MUTUAL-DE-SERVICIOS-AL-POLICIA/PVT-BE
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.mix.js
53 lines (50 loc) · 1.59 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
let mix = require("laravel-mix");
// require("laravel-mix-purgecss");
require("dotenv").config();
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling f all the JS files.
|
*/
const app = process.env.MIX_APP;
mix
.sourceMaps()
.js("resources/assets/js/app.js", "public/js")
.js("resources/assets/js/datatable.js", "public/js")
.sass("resources/assets/sass/wkhtml.scss", "public/css")
.sass("resources/assets/sass/materialicons.scss", "public/css")
.sass("resources/assets/sass/datatable.scss", "public/css")
.stylus('resources/assets/stylus/vuetify.styl', 'public/css')
switch (app) {
case 'prod':
mix
.sass("resources/assets/sass/app.scss", "public/css")
.version()
// .purgeCss({
// enabled: true,
// globs: [
// path.join(__dirname, "resources/views/**/*.blade.php"),
// path.join(__dirname, "resources/assets/js/**/*.vue")
// ],
// extensions: ["html", "js", "php", "vue"],
// whitelistPatterns: [/language/, /hljs/]
// })
;
break;
case 'test':
mix
.sass("resources/assets/sass/app_test.scss", "public/css/app.css")
break;
case 'dev':
mix
.sass("resources/assets/sass/app_dev.scss", "public/css/app.css")
break;
default:
break;
}
// mix.browserSync("https://wwwachuchus.dev");