-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
webpack-docker.mix.js
40 lines (39 loc) · 1.04 KB
/
webpack-docker.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
let mix = require('laravel-mix'),
build = require('./cleaver.build.js'),
command = require('node-cmd')
path = require('path');
mix.disableNotifications()
.webpackConfig({
plugins: [
build.cleaver
],
devServer: {
contentBase: path.join(__dirname, 'dist')
}
})
.setPublicPath('./')
.js('resources/assets/js/app.js', 'dist/assets/js')
.postCss('resources/assets/css/app.css', 'dist/assets/css', [
require('tailwindcss')
])
.options({
processCssUrls: false
})
.version()
.browserSync({
files: [
"dist/**/*",
{
match: ["resources/**/*"],
fn: function(event, file) {
command.get('php cleaver build', (error, stdout, stderr) => {
console.log(error ? stderr : stdout);
});
}
}
],
proxy: '0.0.0.0:8080',
host: '0.0.0.0',
notify: false,
open: false
});