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
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:
/* /index.html 200
The local URL is:
http://localhost:4200/home
The Netlify URL is:
https://numeropedia.netlify.app/home/
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:
https://numeropedia.netlify.app/home/polyfills-RX4V3J3S.js
https://numeropedia.netlify.app/home/main-WEVX2VPG.js
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:
/polyfills-RX4V3J3S.js
/main-WEVX2VPG.js
If you don’t want the trailing slash on Netlify, you’ll need to adjust your site accordingly.
Hello,
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?