Skip to content

Add ability to specify additional style preprocessor options #7733

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
StevenBarnettST opened this issue Sep 18, 2017 · 6 comments
Closed

Add ability to specify additional style preprocessor options #7733

StevenBarnettST opened this issue Sep 18, 2017 · 6 comments
Labels
area: @angular-devkit/build-angular feature Issue that requests a new feature
Milestone

Comments

@StevenBarnettST
Copy link

StevenBarnettST commented Sep 18, 2017

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request

Versions.

@angular/cli: 1.4.0
node: 8.4.0
os: win32 x64
@angular/animations: 5.0.0-beta.6
@angular/cdk: 2.0.0-beta.10
@angular/common: 5.0.0-beta.6
@angular/compiler: 5.0.0-beta.6
@angular/core: 5.0.0-beta.6
@angular/forms: 5.0.0-beta.6
@angular/http: 5.0.0-beta.6
@angular/material: 2.0.0-beta.10
@angular/platform-browser: 5.0.0-beta.6
@angular/platform-browser-dynamic: 5.0.0-beta.6
@angular/router: 5.0.0-beta.6
@angular/cli: 1.4.0
@angular/compiler-cli: 5.0.0-beta.6
@angular/language-service: 5.0.0-beta.6
typescript: 2.5.2

Desired functionality.

Please add the ability to specify additional style preprocessor options to be used during compile.

Specifically, I want to be able to enable strict math (strictMath: true) for the Less preprocessor.

Mention any other details that might be useful.

This option is enabled by adding an additional property to the less-loader options, like the second example in the less-loader readme:

            loader: "less-loader", options: {
                strictMath: true,
                noIeCompat: true
            }

The stylePreprocessorOptions setting in the config schema sounds like a great place to add configuration for this. The options already being configured could be merged with any specified in that config object.

@StevenBarnettST
Copy link
Author

@AhsanAyaz this is a different issue than the other ones addressed by #7648.

@AhsanAyaz
Copy link
Contributor

@StevenBarnettST you're right. I removed it from the comment there.

@clydin
Copy link
Member

clydin commented Sep 19, 2017

An argument could be made to always enabled the strictMath option. There's really no need to optimize any math expressions in a dev mode. In production, cssnano should already handle this category of optimization.

@StevenBarnettST
Copy link
Author

@clydin While personally I'd be fine with having strictMath always enabled, it would be a breaking change for people with code that assumes it is disabled. In addition, the Less documentation says they "originally planned to default this to true in the future, but it has been a controversial option".

@Brocco Brocco added P5 The team acknowledges the request but does not plan to address it, it remains open for discussion severity2: inconvenient labels Sep 22, 2017
@filipesilva filipesilva added area: @angular-devkit/build-angular feature Issue that requests a new feature and removed P5 The team acknowledges the request but does not plan to address it, it remains open for discussion severity2: inconvenient labels Oct 1, 2019
@ngbot ngbot bot modified the milestone: Backlog Oct 1, 2019
@alan-agius4
Copy link
Collaborator

Closing, since this has received little to no activity since it has been open since 2017.

You can use a 3rd party builder to extend the Angular CLI and provide additional style preprocessor options.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular-devkit/build-angular feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

6 participants