How do I combine url() designated css into one with gulp?

Asked 1 years ago, Updated 1 years ago, 84 views

For example, if you have a/css/a.css, b/css/b.css, you want to combine them and create css/x.css.

 with reference to a/css/a.css --url(../image/A.png)
a/image/A.png
b/css/b.css --url (../image/A.png) referenced
b/image/A.png

Simply concatenating with gulp-concat disables url() references.How do I keep url() references enabled when summarized in gulp?

gulp

2022-09-30 19:34

1 Answers

There is a gulp-css-rebase-urls that specializes in doing exactly that.How do you like it?

(I didn't try it, so I'm sorry if I didn't meet the requirements...)


2022-09-30 19:34

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.