Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

/static/ works in development but not when building #4971

Closed
1 of 3 tasks
JonnyBurger opened this issue Jun 15, 2021 · 2 comments
Closed
1 of 3 tasks

/static/ works in development but not when building #4971

JonnyBurger opened this issue Jun 15, 2021 · 2 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@JonnyBurger
Copy link
Contributor

馃悰 Bug Report

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.

Description

If I have an image in /static/img.png then I can link to it using <img src="/static/img.png" /> while previewing but it breaks when building and I need to change it to /img.png.

Could either remove this mechanism in dev mode or trigger a broken build because of a broken link - anything that would catch the error would be useful.

Have you read the Contributing Guidelines on issues?

Yes

@JonnyBurger JonnyBurger added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Jun 15, 2021
@slorber
Copy link
Collaborator

slorber commented Jun 18, 2021

@divyabhushan that seems unrelated, @JonnyBurger is not using a baseurl in prod: https://www.remotion.dev/

He's right, /static/img.png should not be served in dev for consistency with prod build, only /img.png should be served in dev.

Not sure where this comes from, if anyone wants to investigate, it might be in:

@slorber
Copy link
Collaborator

slorber commented Oct 28, 2021

Seems fixed by #5420

This does not work in dev: http://localhost:3000/static/img/docusaurus.png

@slorber slorber closed this as completed Oct 28, 2021
@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

No branches or pull requests

3 participants