mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +00:00
fix(vue-app): remove hash from payload path (#7614)
* fix(vue-app): remove hash from payload path * test: add hash usage to full-static fixture
This commit is contained in:
parent
a87218b745
commit
a52385361b
@ -295,7 +295,7 @@ export default {
|
|||||||
if (base && route.startsWith(base)) {
|
if (base && route.startsWith(base)) {
|
||||||
route = route.substr(base.length)
|
route = route.substr(base.length)
|
||||||
}
|
}
|
||||||
route = (route.replace(/\/+$/, '') || '/').split('?')[0]
|
route = (route.replace(/\/+$/, '') || '/').split('?')[0].split('#')[0]
|
||||||
const src = urlJoin(base, staticAssetsBase, route, 'payload.js')
|
const src = urlJoin(base, staticAssetsBase, route, 'payload.js')
|
||||||
try {
|
try {
|
||||||
const payload = await window.__NUXT_IMPORT__(decodeURI(route), encodeURI(src))
|
const payload = await window.__NUXT_IMPORT__(decodeURI(route), encodeURI(src))
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<NLink to="/pagination/1">
|
<NLink to="/pagination/1">
|
||||||
Pagination
|
Pagination
|
||||||
</NLink>
|
</NLink>
|
||||||
<NLink to="/dynamic/foo bar">
|
<NLink to="/dynamic/foo bar#hash">
|
||||||
Dynamic route 1
|
Dynamic route 1
|
||||||
</NLink>
|
</NLink>
|
||||||
<NLink to="/dynamic/foo%20bar">
|
<NLink to="/dynamic/foo%20bar">
|
||||||
|
Loading…
Reference in New Issue
Block a user