A
A
Alexander2018-06-13 16:36:37
webpack
Alexander, 2018-06-13 16:36:37

How to change image paths in scss with webpack?

It is necessary that the paths in the type properties change to
content:url('/img/dropdown.png');
content:url('/app/img/dropdown.png');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Sugonyaev, 2018-06-13
@coolswood

Try to set it in 'name' option, in 'context' you can set where to look for pictures.

use: [{
           loader: 'file-loader',
               options: {
                    name: 'img/[path][name].[ext]',
                    context: './src/pages/'
                   }
               },

https://webpack.js.org/loaders/file-loader/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question