[Webpack] Access Webpack Dev Server from Mobile Safari on an iPhone

Posted Answer1215

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Webpack] Access Webpack Dev Server from Mobile Safari on an iPhone相关的知识,希望对你有一定的参考价值。

Testing your sites on mobile devices is a critical part of the development process. Webpack dev server enables you to visit the server from any device using the host option. This lesson walks you through accessing webpack dev server using an iPhon

 

Check you ip address:

ifconfig

 

For scripts:

"start": "webpack-dev-server --open --hot --host 0.0.0.0 --port 4000"

 

After running the application, go to your ip address:port on your iphone, you should be able to access the app and hot reloading enabled

以上是关于[Webpack] Access Webpack Dev Server from Mobile Safari on an iPhone的主要内容,如果未能解决你的问题,请参考以下文章

如何使用 reactjs 和 webpack 允许 Access-Control-Allow-Origin?

vue项目开发,用webpack配置解决跨域问题

vue-route+webpack部署单页路由项目,访问刷新出现404问题

Webpack 配置以使用没有 CORS 标头的 API

vue-cli webpack 开发环境跨域

Webpack:安装 webpack 和 webpack-cli 后运行 webpack 时仍然报错