Answer the question
In order to leave comments, you need to log in
How to disable converting images to base64 in gulp?
Here is my code
function stylusTask() {
return src(path.stylus.src)
.pipe(plumber())
.pipe(sourcemaps.init())
.pipe(stylus({
use: nib(),
import: ['nib'],
compress: true
}))
.pipe(sourcemaps.write('.'))
.pipe(dest(path.stylus.dest))
}
Answer the question
In order to leave comments, you need to log in
Answer:
https://stackoverflow.com/questions/63477465/how-t...
The problem was two things:
1. you need to add a limit to the image weight:
function stylusTask() {
return src(path.stylus.src)
.pipe(plumber())
.pipe(stylus({
use: nib(),
import: ['nib'],
compress: true,
define: {
url: require('stylus').url({
limit: 1
})
}
}))
.pipe(dest(path.stylus.dest))
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question