Help: SOME times i get a blank screen on first load and its fixed by hard refreshing

Hi! I am deploying an SPA (https://venerable-unicorn-1d4ef2.netlify.app/)
and some times when i first the site enter i have to hard refresh the website because i get a blank screen

This is the console error:
WhatsApp Image 2024-06-20 at 5.04.47 PM

And i do use a netlify.toml:

[[redirects]]
  from = "/.well-known/assetlinks.json"
  to = "/well-known/assetlinks.json"
  status = 200
 [redirects.headers]
    cache-control = "no-store"

  
[[headers]]
  for = "/well-known/assetlinks.json"
  [headers.values]
    Content-Type = "application/manifest+json"


[[headers]]
  for = "/manifest.webmanifest"
  [headers.values]
    Content-Type = "application/manifest+json"

[[headers]]
  for = "/assets/*"
  [headers.values]
    cache-control = '''
    max-age=0,
    no-store,
    must-revalidate'''

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

[build]
  command = "npm run build"
  publish="/dist"
  base = ""
type or paste code here

Again. is not a persistent issue and it just happens SOME TIMES when i enter after a while. is not an isolated thing since it has been reported to me by other people
I tried clearing the cache and deploy, adjusting the toml… But nothing worked

@pimepanama This will be due to code having changed, a new hash for the filename being generated and the previous file no longer existing after the new deployment.

The reason you see it as a MIME type of “text/html” error is because the file isn’t found, which would be a 404 and instead the redirect you have of /* /index.html 200 returns the contents of the /index.html file, which has a MIME type of “text/html” (and obviously isn’t valid JavaScript).

It’s mentioned here in the documentation:
https://docs.netlify.com/configure-builds/javascript-spas/#code-splitting-or-hashed-filenames

Here’s the relevant support guide:
https://answers.netlify.com/t/support-guide-handling-code-splitting-issues-on-netlify/113158

Thank! i will look into it. Will mark this as resolved if it solves the problem