Conversation
✅ Deploy Preview for nuxt3-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
Thanks for the PR, we have been struggling due to the issue since last week. As a workaround we have updated the build files under node_modules directly ( For enabling hash-based routing we had modified import {
createRouter,
createWebHistory,
createMemoryHistory
} from "vue-router";to import {
createRouter,
createWebHashHistory as createWebHistory,
createMemoryHistory
} from "vue-router";And fixed following issue mentioned in PR
by changing following function createCurrentLocation(base, location) {
const { pathname, search, hash } = location;to function createCurrentLocation(base, location) {
const { pathname, search, hash } = new URL((location.hash || '').replace(/^#/, ''), location.origin);As a temporary workaround it's working 👍 waiting for your PR to merge. |
|
@pi0 is there something we could potentially help with to get this PR merged quicker? 😄 |
|
WoW I didn't expect this amount of welcoming for this particular feature <3 Surely we can move it to the edge. Only there is an issue that redirects to |
🔗 Linked issue
nuxt/nuxt#13821
❓ Type of change
📚 Description
This PR adds support for hash history mode for router (client only) with a new option. In order to enable:
Remarks:
createWebHashHistoryis super simple. It basically appends#to the base with location.host and reusecreateWebHistory. So there is almost no bundle overhead for this optionrouter.optionstoapp.routerthis way option would be simplerapp.router.hashMode: falseinstead ofrouter.options.hashMode: false.router.modefrom Nuxt 2 is also deprecated. We could portal it but it makes it harder to merge with one options object.TODO:
/#each timessr: falsewithhashMode: true