You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using JSX <img src={}> tags allows you to import images using require statements and have them correctly handled by webpack, but using the markdown ![alt]({{src}}) syntax does not generate a require statement, so the assets aren't processed by webpack.
It would be good to support {{importedVariable}} interpolation in the markdown syntax too.
It would be even nicer (in my opinion at least) if images were automatically transformed into webpack requires.
Thanks for the very cool webpack loader! I'd be open to creating a pull request if you can confirm which of the images in the example should be transformed into require statements
The text was updated successfully, but these errors were encountered:
Ah, that’s an unfortunate gotcha, and I know why it’s happening - the interpolation is being set aside to be re-inserted, but what it’s replaced with gets quoted by the markdown processor.
I believe this is fixable, but for now, I’d just stick to using an <img> tag directly.
Using JSX
<img src={}>
tags allows you to import images usingrequire
statements and have them correctly handled by webpack, but using the markdown![alt]({{src}})
syntax does not generate a require statement, so the assets aren't processed by webpack.It would be good to support
{{importedVariable}}
interpolation in the markdown syntax too.It would be even nicer (in my opinion at least) if images were automatically transformed into webpack requires.
Markdown to reproduce:
Actual output
Expected output
Thanks for the very cool webpack loader! I'd be open to creating a pull request if you can confirm which of the images in the example should be transformed into require statements
The text was updated successfully, but these errors were encountered: