Laravel Jetstream使用Vite
抱歉,
当我将Laravel Jetstream用于我的项目时,我的英语很糟糕。因为当我使用stack livewire时,显示不匹配,在这里我给出输出结果 在此处输入图像描述
,而且我还运行了NPM install& NPM运行开发人员,因此它将使用Mix默认运行开发 在这里,我将提供项目文件夹结构 在此处输入图像描述
也许我可以得出的结论是将开发过程从Mix转换为Vite,或者这里有专家有关如何解决问题的提示? 先感谢您
sorry in advance my english is bad
I have a problem when I will use laravel jetstream for my project. Because when i used stack livewire, the display doesn't match, here I give the output result
enter image description here
And also I've run npm install & npm run dev so it will run development using mix as default
Here I will give the project folder structure
enter image description here
maybe what I can conclude is to change the development process from mix to vite, or there are hints from the experts here on how to solve the problem?.
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
实际上,您可以通过在视图/布局/应用程序和来宾刀片中替换@vite来解决此问题。
Actually you can fix this issue by replacing the @vite with these one in views/layouts/app and guest blade.
因为您安装了laravel的先前版本,所以@vite添加了9。+ laravel,所以我认为它只是BC您使用8。(Any&lt; 9)版本,只需安装以前的jetstream版本,例如<强>作曲家需要Laravel/Jetstream:2.7.0
because you install previous version of laravel, @vite was added in 9.+ laravel so i think its just bc you using 8. (any <9) version, just install previous jetstream version for example composer require laravel/jetstream:2.7.0
转到 Resources \ view \ Layouts \ Guest.blade.php 和 Resources \ view \ layouts \ layouts \ app.blade.php 并替换下面的代码(如果不存在),只是在这两个文件中插入以下代码。
,还记得发表评论@Vite线,请参见下面的屏幕截图。
请参阅ScreenShot
我希望它能解决问题。
go to resources\views\layouts\guest.blade.php and resources\views\layouts\app.blade.php and replace below code, if its not there, just insert below code in these two files.
and also remember to comment out @vite line, see below screenshot.
see screenshot
I hope it will solve the problem.
这可以帮助您解决@vite:
PHP工匠视图:清除
this can help you to solve @vite :
php artisan view:clear