-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.mix.js
More file actions
50 lines (46 loc) · 1.2 KB
/
webpack.mix.js
File metadata and controls
50 lines (46 loc) · 1.2 KB
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
let mix = require('laravel-mix');
// Mix Extensions
require('mix-html-builder');
require('laravel-mix-webp')
// Mix Configuration
mix.setPublicPath('public');
mix.setResourceRoot('assets');
mix.webpackConfig({
stats: {
children: true,
},
});
mix.browserSync({
proxy: 'https://inge-portfolio.dev/',
files: [
'public/assets/*.css',
'public/assets/*.js',
'public/index.html',
'public/assets/*.webp',
],
});
// Mix Execution
mix.js('src/js/**/*.js', 'public/assets/app.js')
.sass('src/scss/index.scss', 'public/assets')
.sourceMaps().version().setPublicPath('public');
mix.html({
htmlRoot: 'src/html/index.html',
output: '.',
inject: true,
partialRoot: 'src/html/partials',
layoutRoot: 'src/html/layouts',
versioning: true,
minify: {
removeComments: true
}
});
mix.copyDirectory('fonts', 'public/fonts');
mix
.ImageWebp({
from: 'assets/images',
to: 'public/assets/images',
})
mix.copyDirectory("assets/icons", 'public/assets/icons');
mix.copyDirectory("assets/favicon", 'public/assets/favicon');
mix.copy("assets/site.webmanifest", "public/assets/site.webmanifest");
mix.copy("assets/*.pdf", "public/assets/");