Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

webpack-dev-server parameter --host #26

Closed
waynelkh opened this issue Jan 4, 2016 · 3 comments
Closed

webpack-dev-server parameter --host #26

waynelkh opened this issue Jan 4, 2016 · 3 comments

Comments

@waynelkh
Copy link

waynelkh commented Jan 4, 2016

How can I run webpack-dev-server bind in host 0.0.0.0, I need to develop on the remote machine.

builder run server-dev --host 0.0.0.0

It's not work.

@ryan-roemer
Copy link
Member

@waynelkh -- Builder allows overrides from your root project, so in in ROOT/package.json:scripts, add this override:

    "server-dev": "webpack-dev-server --port 3000 --host 0.0.0.0 --config node_modules/builder-react-component/config/webpack/demo/webpack.config.dev.js --colors --content-base demo",

and then builder run server-dev and any task that includes server-dev will use your version.

@waynelkh
Copy link
Author

waynelkh commented Jan 4, 2016

It work! Thanks.
But, is there any better way to do that?
I think overrides the script is to unnecessary.
Maybe can use npm script to pass the parameter in builder run server-dev -- --host 0.0.0.0

@ryan-roemer
Copy link
Member

@waynelkh -- Good suggestion! Captured as #27 for the feature request and closing this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants