summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/mdx-syntax-highlighting.test.js
diff options
context:
space:
mode:
authorGravatar Alexey Shmalko <rasen.dubi@gmail.com> 2023-01-30 22:29:41 +0200
committerGravatar GitHub <noreply@github.com> 2023-01-30 15:29:41 -0500
commitb3e65991f731f5320ba5826c731934a8e8482493 (patch)
treee4fbc3765350ee76ae6108087d511029fb0333da /packages/integrations/mdx/test/mdx-syntax-highlighting.test.js
parentca91976edbfd34adbb31096516a266f31d8f6216 (diff)
downloadastro-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