K
K
kirillsnovikov2019-10-17 13:23:45
webpack
kirillsnovikov, 2019-10-17 13:23:45

How to change paths inside css on build?

Hello!
Does anyone know if it is possible to somehow change the relative paths in SCSS files during assembly, like:

.icon {
        background: url('./../icons/icon.svg') no-repeat center;
}

I need this to arrive in the assembly
.icon {
        background: url('/path/icon.svg') no-repeat center;
}

wrote the simplest loader for webpack, which stupidly replaces ./../../ with /path/ , but the fucking vue-cli has its own settings and it’s impossible to sub
-plug in vue.config.js add-ons either, by default in assembly substitutes the actual path like '../img/icon.svg'

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question