Blank website for domain.com/blog

My site is deployed on smallest.ai custom domain and it works perfectly fine. I was trying to add a route to smallest.ai/blog but opening this just gives a blank page with the following error:


Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

Summarizing:

  1. I get a complete blank page when I go to smallest.ai/blog
  2. The code (at least the structure) is very very similar for smallest.ai/sapien but this works fine
  3. Once I open smallest.ai/blog and then try to open smallest.ai/sapien it also fails to open
  4. www.smallest.ai/blog works
  5. all other URLs work with and without www

I am building my project with vite build, my publish directory is dist.

import React from 'react'
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'
import { Sapienpage, Homepage, Blogpage } from './components'

const App = () => {
  return (
          <Router>
            <Routes>
              <Route path="/" element={<Homepage />} />
              <Route path="/sapien" element={<Sapienpage />} />
              <Route path="/blog" element={<Blogpage />} />
            </Routes>
          </Router>
        )
}

export default App

This is how I access my blog page and sapien page.

Hi @kamathsutra,

Thanks for reaching out and welcome to Netlify’s Support Forums!

I’m unable to reproduce the issue, were you able to fix it?

Visiting https://deploy-preview-16--jolly-marigold-a31e22.netlify.app/ and then going to the blog is resolving properly:

Same if I go to smallest.ai and then blog, or if I go directly to smallest.ai/blog:

Hey Melvin, that’s very strange, I’m seeing a blank page.

Have not been able to solve it yet :confused:

If you clear out your browser cache or try from a different browser/network, do you have the same issue?

It is indeed fixed by using a different browser, however I have one specific PC where it is not opening… very strange. Anyways, thanks for confirming that its working on your end too. I think we can close this issue.