question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Router.base ignored when fetching content

See original GitHub issue

Version

@nuxt/content: v1.2.0 nuxt: v2.12.2

I have router.base set to /fe/. It seems that @nuxt/content ignores this when I call fetch() in my Vue file. When I use curl to call the api explicitly, everything seems fine. I tried setting apiPrefix to fe/_content, and then the api is called there, but is actually available at /fe/fe/_content

(Sorry, I didn’t manage to operate the codesandbox)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
benjamincanaccommented, Jun 2, 2020

@mkamensky Do you have this error on dev mode with universal mode?

It should be fixed in the last update of the PR.

0reactions
mkamenskycommented, Jun 2, 2020

@benjamincanac no, it’s SPA mode

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue router - API Data not fetching on redirect - Stack Overflow
So when you are deleting the product, you have to ignore the response from the server and then push the new path to...
Read more >
Route - Angular
The following route uses the redirectTo property to ignore a segment of a given URL when looking for a child path. When navigating...
Read more >
Vue Router: Reacting to parameter changes - Prismic
Vue Router doesn't re-render a component when a route parameter is changed. Here we discuss how to handle this issue in your Prismic...
Read more >
Using Vue 3's Router in Practice - Daily.dev
This article covers some standout features of Vue Router like programmatic navigation, navigation guards, data fetching, and nested routes ...
Read more >
The Document Base URL element - HTML - MDN Web Docs
If multiple <base> elements are used, only the first href and first target are obeyed — all others are ignored.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found