You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works fine so long as there is no basePath set in next.config.mjs. However, as soon as there is a basePath, it no longer works (404 as the requested url does not include the basePath).
I don't know the basePath in advance as it varies at build time. How can I get the basePath onto all of my asset urls?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a video file located in the repository at
public/video/demo.webmI try to reference it with a url in
content/index.mdxlike so:This works fine so long as there is no
basePathset innext.config.mjs. However, as soon as there is a basePath, it no longer works (404 as the requested url does not include the basePath).I don't know the basePath in advance as it varies at build time. How can I get the basePath onto all of my asset urls?
Beta Was this translation helpful? Give feedback.
All reactions