Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ module.exports = function(source) {
config.plugins = config.plugins.concat(this.options[configKey].lessPlugins || []);
}

// Also support webpack 2 loader.options.
if (query.lessPlugins) {

@sokra sokra Jan 20, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you refactor the config stuff to use loaderUtils.getLoaderConfig(this, "lessLoader")? This function handles the config stuff and merging.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

config.plugins = config.plugins.concat(query.lessPlugins);
}

// not using the `this.sourceMap` flag because css source maps are different
// @see https://github.com/webpack/css-loader/pull/40
if (query.sourceMap) {
Expand Down