Laravel Vite不在移动设备上加载CSS
我的vite有一个奇怪的问题...
我在开发人员中有一个网站,当我从PC上查看它时,Laravel微风的尾风CSS完美地加载了,没有错误。但是,当我从Mobil设备尝试相同的情况时,它说它不能加载CSS也不能加载JS,因为连接被拒绝。
它如何在PC上工作而不是在移动设备上工作?我的Vite Config:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel([
'./public/css/app.css',
'./public/js/app.js',
]),
],
});
Mobile上的错误消息:
GET http://127.0.0.1:3000/public/css/app.css net::ERR_CONNECTION_REFUSED
app.js相同
,我需要在某个地方指定产品IP吗?还是使用SSL?还是需要将文件放在其他DIRS上?还是什么?在台式机上,它在移动设备(和/或Windows平板电脑上!)上都可以完美地工作。
先感谢您!
I have a strange problem with my vite...
I have a site in dev, and when I view it from PC, the laravel breeze tailwind css is perfectly loaded, there are no errors. But when I try the same from a mobil device, it says that it can't load neither the css nor the js, because connection refused.
How can it be, that it works on PC and not on mobile? My vite config:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel([
'./public/css/app.css',
'./public/js/app.js',
]),
],
});
My error message on mobile:
GET http://127.0.0.1:3000/public/css/app.css net::ERR_CONNECTION_REFUSED
Same for app.js
Do I need to specify the prod IP somewhere? Or that it uses SSL? Or need to put the files to other dirs? Or what? On desktop it works perfectly, on mobile (and/or on windows tablet!) it does not at all.
Thank you in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论