MediaQuery not working in production

Hello All,

Media Queries worked properly when I run in local but when I deployed to production its not working, anyone please help I am trying to fix this from last 2 days.

GitHub:GitHub - chandangowda33/NumeroPedia
App:NumeroPedia| Home

@gowdac33 This issue is a combination of three things:

  • Some of your assets are referenced with relative links
  • Your page is redirecting to have a trailing slash when hosted on Netlify
  • You have an SPA rewrite along the lines of /* /index.html 200

The local URL is:

The Netlify URL is:

You have relative links for these assets:

You can see them failing to load in the developer console:

Since the path is /home/ it tries to load the relative assets from:

The files do not exist there, (they’re at the root), but instead of a 404 the SPA rewrite causes the HTML content of your /index.html file to be returned instead, this is why it appears as a MIME type error. You can see this happening in the developer console too:

To fix you should change your asset references to root relative:

If you don’t want the trailing slash on Netlify, you’ll need to adjust your site accordingly.


Thanks for your instructions, I added below code in index.html

Now in console I am not getting the error which I used to get earlier.

Yet media Query is not working.
Nedd to change anything else?

@gowdac33 Are you deploying to a different site, because I do not see that change?