vite-plugin-pug icon indicating copy to clipboard operation
vite-plugin-pug copied to clipboard

images referenced in pug are not included in production build

Open niklas-dahl opened this issue 3 years ago • 3 comments

when using an image tag inside a pug file like this: img#logo(src="./assets/example.png") the image is not included in the production builds dist folder and the file path is not transformed.

Thanks!

niklas-dahl avatar Jun 18 '21 11:06 niklas-dahl

Same problem Here!

img(src=${images}/example.png)

Not working.

djawad98 avatar Jun 26 '21 18:06 djawad98

Basically, No assets will be included in production build when they are linked using the plugin. CSS, JS or images.

djawad98 avatar Jun 29 '21 18:06 djawad98

If you place images in public folder like so: public/example.png and reference with absolute path img(src="/example.png") then this seems fine. Obviously not always ideal.

michaelpumo avatar Dec 22 '21 00:12 michaelpumo