Laravel Filament部署至Apache服务器时遭遇MIME类型异常及动态模块导入失败问题求助
Laravel Filament部署至Apache服务器时遭遇MIME类型异常及动态模块导入失败问题求助
大家好,我最近尝试把我的Laravel Filament项目部署到Apache服务器(用的XAMPP环境),结果遇到了两个之前从未碰到过的问题,实在找不到解决方向,来这里求助!
我遇到的报错信息如下:
- 第一个是MIME类型相关的控制台报错:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.
- 第二个是动态模块导入失败的报错:
Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://103.179.216.68/js/filament/forms/components/select.js?v=3.0.0.0
下面是我的Apache虚拟主机配置内容:
<VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/Infakin-2.0/public" ServerName panelinfakin.ictitlmi.info <Directory "C:/xampp/htdocs/Infakin-2.0/public"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny allow from all Require all granted </Directory> </VirtualHost>
特别说明一下:我在本地开发时使用php artisan serve启动项目,完全不会出现这些问题,所以我怀疑是XAMPP中的Apache配置存在问题。麻烦各位帮忙分析一下,非常感谢!
备注:内容来源于stack exchange,提问作者Gagas Amukti
相关产品推荐
相关产品推荐

