During the creation of a production version of my Angular 9.0.4 application, I noticed that the CSS is bundled and placed at the top of the dist/index.html file as shown below:
<link rel="stylesheet" href="styles.6ea28d52542acb20a4c6.css"><!doctype html>
<html lang="en>
<head>
<meta charset="utf-8">
<title>MyTitle</title>
<base href="/">
This seems to be triggering a warning in Chrome:
Resource interpreted as Stylesheet but transferred with MIME type text/html:
As a result, the stylesheet is not rendering correctly. It's worth noting that this issue occurs only when navigating to URLs with subfolders such as www.mydomain.com/product/1.
Is there a way to adjust the build configuration so that the stylesheet element is inserted after the <base href="/">
tag? This adjustment could potentially resolve the warning message.