-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
71 lines (63 loc) · 1.67 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
66
67
68
69
70
71
/*
|--------------------------------------------------------------------------
| 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 your application, as well as bundling up your JS files.
|
*/
const mix = require('laravel-mix');
// const dotenv = require('dotenv');
mix.setPublicPath('public/assets') // generate manifest in this directory
// JavaScript ES6
.js('src/scripts/app.js', 'scripts/main.js')
// .extract([
// 'fancybox',
// 'jquery',
// ])
// SCSS to CSS
.sass('src/styles/app.scss', 'styles/main.css')
// .sourceMaps();
// Process images + media
.copyDirectory('src/images', 'public/assets/images')
// Process webfonts
.copyDirectory('src/fonts', 'public/assets/fonts')
// Live reload browser
.browserSync({
watch: true,
// proxy: process.env.SITE_URL,
proxy: 'http://recipes.onemohrti.local',
// files: [
// '{*,**/*}.css',
// '{*,**/*}.js',
// '{*,**/*}.twig'
// ],
files: [
'assets/scripts/*.js',
'src/scripts/*.js',
'src/scripts/**/*.js',
'assets/styles/*.css',
'src/styles/*.scss',
'src/styles/**/*.scss',
'templates/*.twig',
'templates/**/*.twig'
]
})
// Additional config
// .minify() // create sibling *.min file
// .disableSuccessNotifications()
// .version()
.options({
autoprefixer: {
options: {
grid: "autoplace"
}
},
postCss: [
require('autoprefixer')
],
processCssUrls: false,
})
;