Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Hosting on Amplify Metronic 8 vue js version


I deployed the metronic 8 vuejs demo1 to amplify and its not rendering properly. Anyone was able to deploy and has the steps to make it work?

if you go to it, you will see with developer tools that its strangely trying to load stuff into the static index.html page

https://master.d399gdl6wuc7cz.amplifyapp.com/

Any help would be appreciated - amplify is pretty new to me but I was able to deploy project I created from scratch and now I am trying to get metronic hosted there so that I can later customize it and integrate it with AWS hosted backend.


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)


it has to do something with the vue.config.js file

const { defineConfig } = require("@vue/cli-service");

module.exports = defineConfig({
publicPath:
process.env.NODE_ENV === "production" ? "/metronic8/vue/demo1/" : "/",
transpileDependencies: true,
chainWebpack: (config) => {
config.resolve.alias.set("vue-i18n", "vue-i18n/dist/vue-i18n.cjs.js");
},
});

this reference to metronic8/vue/demo1 doesnt exist in my git repo, since I dont think I need that there, but when I change it to "/" , the build fails in amplify



looks like I got it fixed now and it works



Hi Chris,

By default, our previews are served under "/metronic8/vue/demo1/", when you deploy Metronic on your host you should update publicPath up to the path on your server. If you do not have a nested folder, you can keep "/" for production.

You can read more about this property in the official documentation: https://cli.vuejs.org/config/#publicpath

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Thank you Lauris.


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  :(