From a52385361bd9f612b39b0dd0850b9fde54d677c0 Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Fri, 26 Jun 2020 17:10:24 +0200 Subject: [PATCH] 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 --- packages/vue-app/template/App.js | 2 +- test/fixtures/full-static/layouts/default.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vue-app/template/App.js b/packages/vue-app/template/App.js index 9a9affa862..0744e91730 100644 --- a/packages/vue-app/template/App.js +++ b/packages/vue-app/template/App.js @@ -295,7 +295,7 @@ export default { if (base && route.startsWith(base)) { 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') try { const payload = await window.__NUXT_IMPORT__(decodeURI(route), encodeURI(src)) diff --git a/test/fixtures/full-static/layouts/default.vue b/test/fixtures/full-static/layouts/default.vue index fa97280737..5f079d32cb 100644 --- a/test/fixtures/full-static/layouts/default.vue +++ b/test/fixtures/full-static/layouts/default.vue @@ -10,7 +10,7 @@ Pagination - + Dynamic route 1