使用nginx部署vue项目,访问整体样式加载出错;

查看chrome浏览器的console,类似下图

使用nginx部署vue项目Resource interpreted as Stylesheet but transferred with MIME type text/plain

 

 后在网络上查找原因,发现是nginx配置有问题,可参考nginx默认配置,具体配置如下:

使用nginx部署vue项目Resource interpreted as Stylesheet but transferred with MIME type text/plain

 

 清理缓存再次访问即可。

 

相关文章:

  • 2021-06-20
  • 2021-07-14
  • 2021-09-20
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2021-07-26
猜你喜欢
  • 2021-05-28
  • 2021-10-17
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案