diff options
author | 2023-01-30 22:29:41 +0200 | |
---|---|---|
committer | 2023-01-30 15:29:41 -0500 | |
commit | b3e65991f731f5320ba5826c731934a8e8482493 (patch) | |
tree | e4fbc3765350ee76ae6108087d511029fb0333da /packages/integrations/mdx/test/mdx-syntax-highlighting.test.js | |
parent | ca91976edbfd34adbb31096516a266f31d8f6216 (diff) | |
download | astro-b3e65991f731f5320ba5826c731934a8e8482493.tar.gz astro-b3e65991f731f5320ba5826c731934a8e8482493.tar.zst astro-b3e65991f731f5320ba5826c731934a8e8482493.zip |
fix(image): allow usage of image from any directory (#5932)
Currently, @astrojs/image allows *importing* images from srcDir
only. Importing images from outside srcDir fails miserably *in dev
mode* and produces incorrect src.
This happens because `path.relative(fileURLToPath(config.srcDir), id)`
resolves to "../something" and when joined with '/@astroimage' cancels
it out (`join('/@astroimage', '../../something')` => `'/something'`).
Rework /@astroimage URL scheme to be similar to "/@fs/" scheme—always
export absolute path to the target file.
Diffstat (limited to 'packages/integrations/mdx/test/mdx-syntax-highlighting.test.js')
0 files changed, 0 insertions, 0 deletions