K
K
KrisTeylor2021-12-11 17:54:10
css
KrisTeylor, 2021-12-11 17:54:10

Which webpack5 plugin is capable of rewriting links in css/scss?

There is a problem - in the webpack 5 build that I use, in the css output, the paths for relative links start with /, but they need to start with ./.
In the assembly, for convenience, I use the alias @.
After assembly , it changes to , as far as I understand, this is done by css-loader, but it needs to change to Help with advice, is there a suitable plugin that can help me?
url(@/fonts/ptsansbold.woff)
url(/fonts/ptsansbold.woff)
url(./fonts/ptsansbold.woff)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Name_23, 2021-12-15
@Name_23

The idea is that you yourself in the js file or whatever you use write a function that will execute this command as you want.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question