Hello, I'm developing application using Metronic Vue 8.2.5 version
I can run the application just fine using Node 20.11
but I can't build the apps. I even tried to build the base Metronic vue and found out that I can't build it either.
Is there any specific requirements that must be meet to be able to build the app?
Hi,
Thank you for reaching out to us.
To build an application for production you should run the command npm run build.
Please let us know if you have any errors.
To get more information about building app for production check out the official Vite documentation.
https://vitejs.dev/guide/build.html#building-for-production
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Hi, I tried with both npm run build and npm run build-only commands and still got errors
with npm run build-only, the path of some files are wrong, for example I need CSS file from http://localhost/dist/splash-screen.css but the build got the file from http://localhost/splash-screen.css so I got a 404.
How do I fix this?
Hi,
Did you update the base path in vite.config.js?
By default, our previews are served under /metronic8/vue/demo1/
, when you deploy Metronic on your server, you should update base property up to the path on your server in file vite.config.js. If you do not have a nested folder on your server then you can set base path to /
.
You can read more about this property in the official documentation: https://vitejs.dev/guide/build#public-base-path.
Regards,
Lauris Stepanovs,
Keenthemes Support Team