Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Metronic8 React TypeScript Vite Build not working in Production!


Hi Developers!

Here I am using Metronic 8 React Version build on Vite.
I am facing issue in build running locally running index.html file using live server.
Its working Fine with npm run dev, npm run build, npm run preview.
but when I running build locally its giving these Errors.

http://127.0.0.1:5500/metronic8/react/demo1/assets/index-CYOOHYlS.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Encountering issues with the Metronic8 React TypeScript Vite build in production can be quite frustrating, especially when you’re in the middle of launching a project. In the gambling industry, seamless performance is crucial, as even minor glitches can affect user experience and engagement. Many developers find that using Vite for fast builds is efficient during development, but problems often arise during the production build due to configuration mismatches. This is similar to the importance of reliable and efficient payment processing in online casinos. When users make deposits and withdrawals, they expect a smooth and error-free experience. To ensure hassle-free transactions, it’s essential to use secure payment methods like the ones offered at https://glory-casino-bd.pro/payments/ Just as fixing build errors requires attention to detail, providing a stable and secure gaming platform is key to maintaining user trust and satisfaction.



Hi,

Thank you for reaching out to us.

Could you please specify which Metronic version you are using?

npm run preview is the command you can use to test your build locally if you are using some custom local server to test build the error could be related to your server setup.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



In npm run preview build is working fine but when i run the build local with direct index.html using live server its not working.
But now i figure it out that issue is in base url set in the vite.config.ts

base: "/", (Now i set to this) so its working fine.

Thankyou
Best Regards
Divyansh Singh
Software Engineer



Hi,

I'm glad to hear you managed to fix this. Yes, the base path should be configured according to your server's path.

Please let me know if you need any additional help on this topic or anything else.

Regards,
Lauris Stepanovs,


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(