Skip to content

Vue.js Tips

Removing the # from the URL

Issue: When using Vue.js to build a project, the URL may contain a #, which affects the overall appearance.


  1. In your project, perform a global search for the const router = new VueRouter({}) function.
  2. Inside the function, add the statement: mode: 'history'

References and Acknowledgments

Original: This post is protected by CC BY-NC-SA 4.0 agreement, should be reproduced with attribution.

This post is translated using ChatGPT, please feedback if any omissions.