forked from timber/starter-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
67 lines (58 loc) · 1.18 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
56
57
58
59
60
61
62
63
64
65
let mix = require('laravel-mix');
const SVGSpritemapPlugin = require('svg-spritemap-webpack-plugin');
mix.options({
processCssUrls: false
})
mix.setPublicPath('dist');
mix
.ts('src/js/app.ts', 'dist/main.js')
mix
.sass(
'src/scss/index.scss',
'dist/style.css'
)
mix.webpackConfig({
plugins: [
new SVGSpritemapPlugin(
[
// might be multiple values
'src/icons/**/*.svg',
],
{
output: {
svg: {
sizes: false,
},
svg4everybody: false,
chunk: {
keep: true,
},
},
sprite: {
gutter: 5,
generate: {
title: false,
use: true,
symbol: true,
view: "-view",
}
},
styles: {
filename: 'src/scss/sprites.scss'
}
}
)
]
});
if (!mix.inProduction()) {
mix
.webpackConfig({
devtool: 'inline-source-map',
})
.sourceMaps();
}
mix.browserSync({
proxy: 'http://localhost:48000/',
files: ['templates/**/*.twig', 'views/**/*.twig', 'src/**/*.*'],
open: false,
});