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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets resolution inconsistency in Dev and Build modes #450

Closed
3 tasks done
aantipov opened this issue Nov 27, 2021 · 0 comments · Fixed by #514
Closed
3 tasks done

Assets resolution inconsistency in Dev and Build modes #450

aantipov opened this issue Nov 27, 2021 · 0 comments · Fixed by #514
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@aantipov
Copy link

aantipov commented Nov 27, 2021

Describe the bug

When a markdown file has sibling assets files

- index.md
- image.png

and assets are referenced as

![An image](image.png)

then those assets

  • are resolved just fine in DEV mode
  • are NOT resolved during BUILD and BUILD fails with an error message like

image

Referencing assets using relative paths ![An image](./image.png) fixes the problem

Reproduction

Described above

Expected behavior

Dev and Build modes should behave the same way.
If assets should be referenced using relative paths, then BOTH modes should fail at resolving absolutely referenced assets

System Info

System:
    OS: macOS 11.6
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 126.73 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 1.22.15 - ~/.nvm/versions/node/v16.13.0/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Brave Browser: 95.1.31.88
    Chrome: 96.0.4664.55
    Firefox: 90.0.2
    Safari: 15.1
  npmPackages:
    vitepress: ^0.20.1 => 0.20.1

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@aantipov aantipov added the bug: pending triage Maybe a bug, waiting for confirmation label Nov 27, 2021
yyx990803 pushed a commit that referenced this issue Feb 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant