Home

Issue: 1527

URL hash value is automatically removed

[issue link]

When my project integrates vue-router-sync, the URL hash value is automatically deleted every time the page is relaoded

NUXT : RC-6

module.exports = {
  /*
  ** Headers of the page
  */
  head: {
    title: 'starter',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: 'Nuxt.js project' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },
  /*
  ** Global CSS
  */
  css: ['~assets/css/main.css'],
  /*
  ** Customize the progress-bar color
  */
  loading: { color: '#3B8070' },
  plugins: [{
    src: '~/plugins/router.js'
  }]
}

// plugins/router.js

import { sync } from 'vuex-router-sync'

export default function ({ app: {store, router, $axios }, error, isServer }) {
  sync(store, router)
}

This question is available on Nuxt.js community (#c1361)