I
I
Ilya Vatrushka2017-11-11 21:09:42
JavaScript
Ilya Vatrushka, 2017-11-11 21:09:42

How to add svg loader to webpack?

Hello. Can you tell me how to add a loader for images and fonts to webpack? And it seems like I started using "Webpack Frontend Starterkit", but I can't add a picture to the page, because there is no loader. Began to google off. dock, try to connect it, but something to no avail. You can take a look, I uploaded what I got to github.
Webpack refuses to see images at all
https://github.com/ilyaphilin/Shophia

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2019-08-19
@vetsmen

const STAGES = {
  2: 'itemGv',
  5: 'itemTm',
};

for (const [ key, val ] of Object.entries(items)) {
  const s = STAGES[val.stage];
  if (s) {
    this.client.srem('items', key);
    this.emit(s, val);
  }
}

V
Vitaly Stolyarov, 2017-11-11
@Ni55aN

The most common file-loader.
For example :

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question