browsersync不会从webpack加载代理

发布于 2025-02-12 13:23:06 字数 878 浏览 1 评论 0原文

我最近使用Laravel遇到了与浏览器代理有关的问题, 不知道如何工作,因为一切都在工作。

这是我的webpack.mix.js

 mix.browserSync({
Proxy: 'localhost:8000'});

,每次我运行时,

npm run watch

它都会运行代理到默认配置,该配置为 http://app.test < /a>而不是本地主机:8000

   1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 1 warning
[Browsersync] Proxying: http://app.test
[Browsersync] Access URLs:
 --------------------------------------
       Local: http://localhost:3002
    External: http://192.168.0.149:3002
 --------------------------------------
          UI: http://localhost:3003
 UI External: http://localhost:3003

IVE试图重新安装浏览器 并将webpack代理更改为各种地址127.0.0.1,但它持续存在相同的问题 有其他方法可以尝试更改代理吗?

Im having issue related to BrowserSync Proxy using Laravel recently,
No idea how because everything was working before.

here is my webpack.mix.js

 mix.browserSync({
Proxy: 'localhost:8000'});

and each time i run

npm run watch

it run the proxy to default configuration which is http://app.test instead of localhost:8000

   1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
webpack compiled with 1 warning
[Browsersync] Proxying: http://app.test
[Browsersync] Access URLs:
 --------------------------------------
       Local: http://localhost:3002
    External: http://192.168.0.149:3002
 --------------------------------------
          UI: http://localhost:3003
 UI External: http://localhost:3003

Ive tried to reinstall browserSync
And change webpack proxy to various addresses 127.0.0.1 but it keeps having same issue
is there another way i could try to change the proxy?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自由如风 2025-02-19 13:23:06

通过运行它而解决的问题

>browser-sync start --proxy localhost:8000

仍然无法弄清为什么我的webpack.mix.js被忽略了。

Solved by running this instead

>browser-sync start --proxy localhost:8000

Still couldnt figure it out why my webpack.mix.js was ignored.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文