如何解决使用浏览器同步时无法从移动设备访问 http://192.168.1.10:3000
我正在尝试设置 BrowserSync 以处理我的 Laravel 项目。但是,当我运行 npm run watch 时,External http://192.168.1.10:3000 不会加载。我在终端中没有收到任何编译错误。有趣的是,Local: localhost:3000 上的 UI 仪表板运行良好。
在cmd中运行:
[Browsersync] Proxying: http://localhost:8000
[Browsersync] Access URLs:
-------------------------------------
Local: http://localhost:3000
External: http://192.168.1.10:3000
-------------------------------------
UI: http://localhost:3001
UI External: http://localhost:3001
-------------------------------------
[Browsersync] Watching files...
我的 webpack.mix.js 文件如下所示:
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean,fluent API for defining some Webpack build steps
| for your Laravel application. By default,we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js','public/js')
.sass('resources/sass/app.scss','public/css');
mix.browserSync('http://localhost:8000/');
我正在使用以下版本:
Laravel-Mix
browser-sync
webpack-dev-server
browser-sync-webpack-plugin
所有版本都是新的! 有什么想法吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。