Why Angular 9 not caching the static files?

Viewed 759

For some reason browser pulls fresh style.css and the main bundle from server every time the page is loaded:

enter image description here

I packaged\deployed my app using ng build --prod --output-hashing none

Index file looks simple too:

  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
  <base href="/">
<link rel="stylesheet" href="styles.css"></head>
<body>
  <ep-layout>
    <div class="spinner-border text-light" style="width: 3rem; height: 3rem;" role="status">
      <span class="sr-only">Loading...</span>
    </div>
  </ep-layout>
<script src="runtime-es2015.js" type="module"></script>
<script src="runtime-es5.js" nomodule defer></script>
<script src="polyfills-es5.js" nomodule defer></script>
<script src="polyfills-es2015.js" type="module"></script>
<script src="scripts.js" defer></script>
<script src="main-es2015.js" type="module"></script>
<script src="main-es5.js" nomodule defer></script>

Is there something I am doing wrong? Also, I have realized my build process creates scripts.js which is very unusual.

Thanks much for the help.

0 Answers
Related