Comments (4)
Sorry for the delay, having too much stuff happening. However, I did look into issue and here's what I found:
- yes, it does open localhost with the config you provided
- no, it does not ignore
host
option, it just uses it for the external url. I guess, this is the proper behavior, as browser-sync server is being hosted on your localhost anyways, and can have aliases (I might be wrong about this, did not find anything related in browser-sync docs) - there is a way to do what you want. you should specify your desired host and it will be used as external url host, then you should add an
option
property (docs), and set it toexternal
, and it will open your host in the browser.
What I put in config:
var BrowserSyncPlugin = require('browser-sync-webpack-plugin');
module.exports = {
entry: './src/entry.js',
output: {
path: './public',
filename: 'bundle.js'
},
plugins: [
new BrowserSyncPlugin({
host: 'abrahadabra.foobar.com',
port: 3030,
server: { baseDir: ['public'] },
open: 'external'
})
]
};
What I see in console:
[BS] Access URLs:
-----------------------------------------------
Local: http://localhost:3030
External: http://abrahadabra.foobar.com:3030
-----------------------------------------------
UI: http://localhost:3001
UI External: http://abrahadabra.foobar.com:3001
-----------------------------------------------
[BS] Serving files from: public
What I see in browser:
http://abrahadabra.foobar.com:3030/
I feel like this issue is about browser-sync configuration and documentation, not about the plugin.
from browser-sync-webpack-plugin.
Hey!
Hm, let me check this out.
from browser-sync-webpack-plugin.
@Va1 Thank you so much for looking into this, if you need any other details as well I'd be happy to help.
from browser-sync-webpack-plugin.
I assume, the issue is closed.
from browser-sync-webpack-plugin.
Related Issues (20)
- failed: Error during WebSocket handshake: Unexpected response code: 503 HOT 2
- Browser CSS is always version behind HOT 1
- How don't restrict CORS? HOT 1
- Browser reloads when build fails HOT 1
- Detect compilation trigger instead of referencing emitted assets when determining whether to inject css or reload HOT 5
- Module installation fails HOT 2
- enable only on certian ENV HOT 2
- 404
- Webpack 5 compatibility HOT 4
- Option to hide snippet info and access url HOT 1
- Doesn't work with WSL (Windows Subsystem for Linux) HOT 1
- Not reloading php partials in WordPress HOT 4
- When files array populated, browsersync forces a page reload HOT 1
- BrowserSync with MiniCssExtractPlugin and reload on inject changes from scss HOT 1
- Feature request: show complition errors via browserSync fullscreen message HOT 1
- Laravel Mix copy
- how to get the instance from node and trigger a reload?
- Incorrect Comparison in axios #1
- Webpack unable to find browser-sync-webpack-plugin unless browser-sync package is installed. HOT 1
- Add support for browser-sync 3 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browser-sync-webpack-plugin.