Skip to content

need to save the background-image url with the whole query #785

Closed
@zww-v5

Description

@zww-v5

I have a problem about the background-image url. There is a background-image url like "background-image: url('../../css/img/slice/icon-arrow-bottom.svg?fill=#444');" in
my css files. I need to retain the 'fill=#444' for the other handling. But when the files dealed with by css-loader, the background-image url change to
"background-image: url(src/css/img/slice/icon-arrow-bottom.svg?#444);". The 'fill=' was lost.
I find this problem caused by the 'idx = url.indexOf("?#");'(in css-loader/lib/loader.js ). In this code, it just retain the query like '#444'. If you can change the code to 'idx = url.indexOf("?");'?
It can retain the whole query with this code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions