Skip to content

Commit d9e38cc

Browse files
authored
Merge pull request #115 from Deuchnord/fix/entrypoint-with-path-prefix
Fix the entrypoint missing the path prefix
2 parents d035754 + 271700f commit d9e38cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/vue/utils/fetch.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ export default function (id, options = {}) {
1212
options.headers.set('Content-Type', MIME_TYPE)
1313
}
1414

15-
return fetch(new URL(id, ENTRYPOINT).toString(), options).then((response) => {
15+
const entryPoint = ENTRYPOINT + (ENTRYPOINT.endsWith('/') ? '' : '/')
16+
17+
return fetch(new URL(id, entryPoint), options).then((response) => {
1618
if (response.ok) return response
1719

1820
return response

0 commit comments

Comments
 (0)