Skip to content

New v5.0.0 version is always rebasing urls #54

Closed
@eneko89

Description

@eneko89

Urls are getting rebased always, even when --with-rebase option is not used.

Both of these rebase urls and produce the same results:

cleancss assets/css/styles.css -o dist/css/styles.min.css
cleancss assets/css/styles.css -o dist/css/styles.min.css --with-rebase

In the source css, I have font and img references like these:

url('../fonts/roboto-400-latin.woff2')
url('../img/bg.jpg')

And with v5.0.0, I get these urls in the minified file, both with and without --with-rebase:

url('../../assets/fonts/roboto-400-latin.woff2')
url('../../assets/img/bg.jpg')

With previous v4.3.0, I used --skip-rebase and was getting:

url('../fonts/roboto-400-latin.woff2')
url('../img/bg.jpg')

I'm running macOS Big Sur 11.2.

Activity

jakubpawlowicz

jakubpawlowicz commented on Feb 10, 2021

@jakubpawlowicz
Collaborator

Hey @eneko89 - can you please provide more details, as described in https://github.com/jakubpawlowicz/clean-css-cli/blob/master/CONTRIBUTING.md ? Thanks!

eneko89

eneko89 commented on Feb 10, 2021

@eneko89
Author

Sure, I'll edit.

changed the title [-]New v5.0.0 version is always rebasing urls, even when --with-rebase is not used[/-] [+]New v5.0.0 version is always rebasing urls[/+] on Feb 10, 2021
eneko89

eneko89 commented on Feb 10, 2021

@eneko89
Author

Done @jakubpawlowicz.

Btw, thanks for your quick response and sorry for the inconvenience 🙂

jakubpawlowicz

jakubpawlowicz commented on Feb 10, 2021

@jakubpawlowicz
Collaborator

No problem @eneko89 Let me have a look at it!

added a commit that references this issue on Feb 11, 2021

Fixes #54 - rebasing is still on if output option is used.

0e15a26
jakubpawlowicz

jakubpawlowicz commented on Feb 11, 2021

@jakubpawlowicz
Collaborator

It's fixed in 5.0.1 on npm. Cheers!

eneko89

eneko89 commented on Feb 11, 2021

@eneko89
Author

I can vouch for that. Thanks! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jakubpawlowicz@eneko89

        Issue actions

          New v5.0.0 version is always rebasing urls · Issue #54 · clean-css/clean-css-cli