Skip to content

Relative paths are not resolved #17

Open
@sebj54

Description

@sebj54

HI,

I'm not sure if this is an issue or a PEBKAC but I can't get any configuration to resolve relative paths in my CSS.

For example, if I use a picture as a background-image, my original code will be:

.test {
    background-image: url(../img/picture.png);
}

With Pleeease, my processed CSS will be:

.test {
    background-image: url(/assets/img/picture.png);
}

With gulp-pleeease, I tried with this code and it doesn't resolve relative paths:

var gulp = require('gulp')
var concat = require('gulp-concat')
var strip = require('gulp-strip-comments')
var compressor = require('gulp-compressor')
var semi = require('gulp-semi').add
var pleeease = require('gulp-pleeease')

gulp.task('default', function() {
gulp.src([
        'assets/bootstrap/css/bootstrap.min.css',
        'assets/helpers/helpers.css',
        'assets/outdated-browser/outdatedbrowser/outdatedbrowser.min.css',
        'system/modules/custom-theme/assets/css/global.css'
        // other CSS files
    ])
        .pipe(concat('all.css'))
        .pipe(pleeease())
        .pipe(gulp.dest('assets'))
})

Am I missing something? Everything is working fine (autoprefixer, etc.) except that. I even tried to remove .pipe(concat('all.css')) but it doesn't change anything.

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions