index.html尝试从根URI解析css文件
我刚刚构建了angular 11+应用程序,并将生成的文件放入我的index.html尝试从根URI解析css文件,html,css,angular,Html,Css,Angular,我刚刚构建了angular 11+应用程序,并将生成的文件放入我的www/文件夹中 我已经有一个网站在www 所以我只是把我的文件放在一个子文件夹www/second site 访问https://my-domain.com/second-site我在控制台上发现一些错误 Refused to apply style from 'https://my-site.com/styles.b571ddf4692cab415961.css' because its MIME type ('text/
www/
文件夹中
- 我已经有一个网站在
www
- 所以我只是把我的文件放在一个子文件夹
www/second site
https://my-domain.com/second-site
我在控制台上发现一些错误
Refused to apply style from 'https://my-site.com/styles.b571ddf4692cab415961.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
它尝试从根目录中获取style.css
,但应该尝试从https://my-site.com/second-side
这是一个角度错误配置还是我应该编辑我的nginx配置?我有点困惑在索引中将第二个站点声明为基本href。html@Romain你解决了这个问题吗?@Zamadulvahid是的。我必须在我的角度配置中定义基本href