Skip to content

[Bug]: "files" is an array, but does not handle multiple files #1317

@the-hotmann

Description

@the-hotmann

Describe the bug

I use the GRUNT plugin.
When purging from a glob, I expirienced, that when I have multiple target files, it just takes the first one.

To Reproduce

        purgecss: {
            my_target: {
                options: {
                    content: ['../embed/frontend/templates/**/*.html', '../embed/frontend/assets/**/*.js']
                },
                files: {
                    'css/app.min-purge.css': ['css/test1.css', 'css/test2.css'],
                },
            },
        },

Expected Behavior

I expected, that all files in "files" are combined and then purged.

Environment

These are my grunt dependencies:

"dependencies": {
    "bootstrap": "5.3.3",
    "grunt": "1.6.1",
    "grunt-cli": "1.5.0",
    "grunt-contrib-cssmin": "5.0.0",
    "grunt-contrib-uglify": "5.2.2",
    "grunt-import": "1.0.3",
    "grunt-purgecss": "7.0.2",
    "htmx.org": "^2",
    "jquery": "3.7.1",
    "load-grunt-tasks": "5.1.0",
    "select2": "4.1.0-rc.0",
    "select2-bootstrap-5-theme": "1.3.0"
  }

I use debian 11 with:

# node --version
v17.9.0
# yarn --version
1.22.22
# npm --version
11.0.0

Add any other context about the problem here

I guess this at some point worked, but I dont know when, since I dont often touch this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions