我刚刚创建了一个新的CSS文件,并在我的Laravel项目中将其命名为new-style.css
。路径为public/assets/css
。这只是一小段CSS代码。我在本地测试了它,它工作得很好。项目的视图已更改。但是当我在产品服务器上测试它时,它根本没有变化。新的CSS文件存在,但我的项目视图中没有任何更改。我在cPanel的文件管理器中检查到,新的CSS文件已经存在并且已经更新。请看下面的图片以了解更多详细信息。
When I inspect the website of my project, that new-style.css file is empty
When I look at Network tab in Chrome
Even though the file exists in cPanel's file manager
这是我的新CSS文件的代码:
#order-table {
width: 100%!important;
}
.glass-card {
background: rgba( 255, 255, 255, 0.40 );
box-shadow: 0 8px 32px 0 rgba( 31, 38, 135, 0.37 );
backdrop-filter: blur( 17.5px );
-webkit-backdrop-filter: blur( 17.5px );
border-radius: 10px;
border: 1px solid rgba( 255, 255, 255, 0.18 );
}
这是怎么回事?我自己找过了,但还是没有找到我的问题的答案。我希望我能在这里找到它。你的帮助对我很有价值。谢谢。
发布于 2021-04-17 03:25:45
将您的Laravel项目部署到部署中后,首先尝试运行npm run prod
。
然后运行以下命令:
php artisan cache:clear
php artisan route:clear
php artisan view:clear
我发现这个清单在部署Laravel项目时很有帮助:Laravel - What steps should one take to make a Laravel app ready for production mode
https://stackoverflow.com/questions/67134341
复制