Skip to content

Assets resolution inconsistency in Dev and Build modes #450

Closed
@aantipov

Description

@aantipov

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.

Activity

added a commit that references this issue on Feb 22, 2022
9270477
locked as resolved and limited conversation to collaborators on Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @aantipov

      Issue actions

        Assets resolution inconsistency in Dev and Build modes · Issue #450 · vuejs/vitepress