Skip to content

The extensions option does not work #12

@fivemru

Description

@fivemru

Hello!

When I set the extensions option as extensions: ['png'] or empty array extensions: [], the plugin tries to process all image formats.

When:

    new ImageSpritePlugin({
      extensions: ['png'],
    }),

I get an error for jpg file:

 92% additional asset processing imageSpriteWebpackPlugin[image-sprite] ✖ 'url(../images/blocks/header/bg-image.jpg)' skipped. Please use 'background-position' as '0 0'
[image-sprite] ⚠ Shorthand properties preferred : background-image: url('../images/blocks/contacts/map.png')

package.json:

    "webpack": "^4.26.1",
    "image-sprite-webpack-plugin": "^0.2.4",

It would also be very convenient to be able to specify in the option a mask or a regular expression for the files to be processed. For example:

match: ['**/sprite/*.png'],

To process png files only from a specific directory.

Thanks, have a nice day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions