T
T
taki1542018-03-02 09:50:56
npm
taki154, 2018-03-02 09:50:56

How to base64 img tag content when building with webpack?

Good afternoon!
When getting acquainted with webpack, I ran into the fact that I can’t defeat the task that seems to me not the most difficult - to take an image with src="...image.png" from an html file and convert it in the output file to an image with base64 .
I have a very vague idea in which direction to move, I would be grateful for any hints.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2018-03-02
@taki154

All we need to move is all we want webpack to do with import / require . You can read the rest here (EN). There's an example and css at the same time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question