Skip to content

Overwrite option not working? #37

@ryexley

Description

@ryexley

I have the following configuration:

"style-image-refs": {
    src: ["app/assets/stylesheets/**/*.css"],
    overwrite: true,
    replacements: [
        { from: "url(\"/images/", to: "url(\"/assets/" },
        { from: "url(\"../images/", to: "url(\"/assets/" }
    ]
}

to replace image URL paths in CSS files. The overwrite attribute seems to be causing the replace functionality to break. If I modify the configuration to write the target files to a different directory, like this:

"style-image-refs": {
    src: ["app/assets/stylesheets/**/*.css"],
    dest: "app/assets/stylesheets/fixed/",
    replacements: [
        { from: "url(\"/images/", to: "url(\"/assets/" },
        { from: "url(\"../images/", to: "url(\"/assets/" }
    ]
}

the files get written to the fixed directory, and the target strings are replaced as expected. But when I use the overwrite attribute it doesn't work.

Anyone else experiencing this? Is my configuration setup wrong or something? Any help would be greatly appreciated.

Thanks.

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