Skip to content

lessPlugins ignored, potential fix #161

@bazineta

Description

@bazineta

Original discussion on this can be found toward the end of #115.

In 3.0.0, lessPlugins option as documented in the README doesn't appear to actually do anything.

If I instead specify less plugins in plugins, the cloneDeep() call in the loader's options processing will wipe the install function from each plugin, and a plugin.install is not a function will be emitted during processing.

What seems to work, assuming that lessPlugins is the desired approach, is adding this:

if (options.lessPlugins) { options.plugins.push.apply(options.plugins, loaderUtils.getOptions(this).lessPlugins); } 

immediately after the line:

options.plugins.push(webpackPlugin); 

In the loader.

I'd guess that cloneDeep() might not actually be what's desired here, but this approach matches the README.

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