Skip to content

Commit

Permalink
Fix overwrite middleware if proxy is String
Browse files Browse the repository at this point in the history
  • Loading branch information
retyui committed Feb 15, 2018
1 parent f557a8e commit ec3805a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/BrowserSyncDevHotWebpackPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ class BrowserSyncDevHotWebpackPlugin extends EventEmitter {
this.browserSyncURLUI = null;
this.browserSyncURLUIExternal = null;

if (
this.options.browserSync &&
typeof this.options.browserSync.proxy === "string"
) {
const target = this.options.browserSync.proxy;

this.options.browserSync.proxy = { target };
}

this.options.browserSync = merge.all([
{
proxy: {
Expand Down

0 comments on commit ec3805a

Please sign in to comment.