From 271700f87923e08a6d8ce2712c29ab319ab699c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Deuchnord?= Date: Sat, 6 Apr 2019 20:33:36 +0200 Subject: [PATCH] Fix the entrypoint missing the path prefix --- templates/vue/utils/fetch.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/vue/utils/fetch.js b/templates/vue/utils/fetch.js index a6652691..e467db61 100644 --- a/templates/vue/utils/fetch.js +++ b/templates/vue/utils/fetch.js @@ -12,7 +12,9 @@ export default function (id, options = {}) { options.headers.set('Content-Type', MIME_TYPE) } - return fetch(new URL(id, ENTRYPOINT).toString(), options).then((response) => { + const entryPoint = ENTRYPOINT + (ENTRYPOINT.endsWith('/') ? '' : '/') + + return fetch(new URL(id, entryPoint), options).then((response) => { if (response.ok) return response return response