Skip to content

Commit ec3805a

Browse files
author
retyui
committed
Fix overwrite middleware if proxy is String
1 parent f557a8e commit ec3805a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/BrowserSyncDevHotWebpackPlugin.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ class BrowserSyncDevHotWebpackPlugin extends EventEmitter {
9090
this.browserSyncURLUI = null;
9191
this.browserSyncURLUIExternal = null;
9292

93+
if (
94+
this.options.browserSync &&
95+
typeof this.options.browserSync.proxy === "string"
96+
) {
97+
const target = this.options.browserSync.proxy;
98+
99+
this.options.browserSync.proxy = { target };
100+
}
101+
93102
this.options.browserSync = merge.all([
94103
{
95104
proxy: {

0 commit comments

Comments
 (0)