Make sure the preview option is working on localhost without local network or internet connection.
This commit is contained in:
@@ -236,9 +236,20 @@ function startBrowserSync() {
|
||||
|
||||
const options = bs.getOptions().toJS();
|
||||
|
||||
const urls = {
|
||||
devTool: options.urls.local.replace(options.port, options.proxy.url.port),
|
||||
previewFrame: options.urls.local,
|
||||
};
|
||||
|
||||
// If local network is available.
|
||||
if (options.urls.external) {
|
||||
urls.devTool = options.urls.external.replace(options.port, options.proxy.url.port);
|
||||
urls.previewFrame = options.urls.external;
|
||||
}
|
||||
|
||||
resolve({
|
||||
devToolUrl: options.urls.external.replace(options.port, options.proxy.url.port),
|
||||
previewFrameUrl: options.urls.external,
|
||||
devToolUrl: urls.devTool,
|
||||
previewFrameUrl: urls.previewFrame,
|
||||
port: options.port
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user