JayeshLab / vue-crypto-dashboard

Cryptocurrency Dashboard made with Vue
https://jayeshlab.github.io/vue-crypto-dashboard/
MIT License
228 stars 116 forks source link

Build files doesnt work on server #3

Closed FxPouya closed 4 years ago

FxPouya commented 4 years ago

Hello, I complied this project ad it works very good in local server: npm run serve

But when build project: npm run build and deploy dict folder on server it dont works and only shows white page(clean). I tried to deploy on Firebase and Ubuntue server(Nginx), and both same problem. Any suggestion? Thanks.

JayeshLab commented 4 years ago

In vue.config.js

module.exports = {
  publicPath: process.env.NODE_ENV === 'production' ? '/vue-crypto-dashboard/' : '/' ,
  filenameHashing: false
};

For production build I have used vue-crypto-dashboard folder under the root to deploy the build, so the url made as https://jayeshlab.github.io/vue-crypto-dashboard/. If you are deploying under domain folder or the main folder you can remove publicPath, as by default it is '/' or you can replace vue-crypto-dashboard with your own folder name in publicPath for production.

FxPouya commented 4 years ago

Thanks. Modified it as below: module.exports = { publicPath: process.env.NODE_ENV === 'production' ? '/' : '/' , filenameHashing: false };

Now it shows first page. Deployed on Firebase: https://fxmathea.firebaseapp.com/

Thanks again.