Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provide support for lesscss plugins#40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jhnns merged 1 commit intowebpack:masterfrommfellner:master
Mar 22, 2015
Merged

Provide support for lesscss plugins#40

jhnns merged 1 commit intowebpack:masterfrommfellner:master
Mar 22, 2015

Conversation

@mfellner
Copy link
Contributor

Since version 2 of less, Clean CSS is no longer bundled but has to be used as a pluginhttp://lesscss.org/usage/#command-line-usage-compress. The query-string configuration of less-loader is insufficient to pass plugin instances to less.

This change allows for plugins to be passed to less as specified here:http://lesscss.org/usage/#plugins-using-a-plugin-in-code.

@jhnns
Copy link
Member

You're right. It's better to use the webpack options in this case (although it's usually discouraged). What do you think@sokra?

Could you namespace and rename the option key tolessPlugins since it's actual a config forplugins. Like this:

module.exports={lessLoader:{lessPlugins:[...]}};

We never used the termlesscss before and afaict it's only their URL, not their actual module name.

@sokra
Copy link
Member

You're right. It's better to use the webpack options in this case (although it's usually discouraged). What do you think@sokra?

yes. If you want to be perfect allow to choose the key in the options by query parameter. This way you could avoid conflicts.

@jhnns
Copy link
Member

If you want to be perfect allow to choose the key in the options by query parameter

That would bethe perfect solution™ indeed 😀. But it should use a sane default like the npm name camelcased.

Something like:

require("!less-loader?config=someCustomName!./main.less")
module.exports={someCustomName:{lessPlugins:[...]}};

Andconfig defaults tolessLoader.

@mfellner
Copy link
ContributorAuthor

@jhnns,@sokra: I committed the suggested changes. Let me know if there are any other improvements I could make! 😄

jhnns added a commit that referenced this pull requestMar 22, 2015
Provide support for LESS plugins
@jhnnsjhnns merged commit5d57637 intowebpack:masterMar 22, 2015
@jhnns
Copy link
Member

Nice! Good work 👍

Shipped with2.2.0

@mfellner
Copy link
ContributorAuthor

Thanks! Glad I could help.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@mfellner@jhnns@sokra

[8]ページ先頭

©2009-2025 Movatter.jp