forked from nachovz/wordpress-gitpod-one-click
-
Notifications
You must be signed in to change notification settings - Fork 8
/
webpack.config.js
34 lines (32 loc) · 839 Bytes
/
webpack.config.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
// Simple default webpack configuration to proxy apache with browser-sync for hot reloading
// on Gitpod with dynamically served PHP files
const { execSync } = require('child_process');
const BrowserSyncPlugin = require('browser-sync-webpack-plugin')
const PROXY_PORT=8001
const BS_PORT = 3005
const GP_URL = execSync(`gp url ${BS_PORT}`)
module.exports = {
mode: "development",
entry: {},
output: {},
plugins: [
new BrowserSyncPlugin(
{
ui: false,
proxy: {
target: `http://localhost:${PROXY_PORT}`
},
// Add other dynamic file types to be hot reloaded here in this array
files: [
"public/**/*.php",
"public/**/*.html"
],
notify: true,
port: BS_PORT,
socket: {
domain: GP_URL
}
}
)
]
}