-
Notifications
You must be signed in to change notification settings - Fork 10
/
webpack.mix.js
39 lines (37 loc) · 996 Bytes
/
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
const fs = require('fs');
if (process.env.MIX_MODE === 'hot') {
mix.options({
hmrOptions: {
host: 'localhost',
port: process.env.WEBPACK_PORT,
}
});
mix.webpackConfig({
devServer: {
https: true,
key: fs.readFileSync('/etc/ssl/server.key'),
cert: fs.readFileSync('/etc/ssl/server.crt'),
headers: {
'Access-Control-Allow-Origin': '*'
},
host: '0.0.0.0',
port: process.env.WEBPACK_PORT,
public: 'https://localhost:' + process.env.WEBPACK_PORT
},
});
}
if (process.env.MIX_BROWSERSYNC === 'enabled') {
mix.browserSync({
https: {
key: "/etc/ssl/server.key",
cert: "/etc/ssl/server.crt"
},
notify: false,
open: false,
files: [
'./resources/views/**/*.blade.php',
'./app/**/*.php',
],
reload: false
});
}