Angular CLI 6.0.0 support for stylePreprocessorOptions
See original GitHub issueVersions
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 6.0.0-rc.6
Node: 8.9.1
OS: darwin x64
Angular: 5.2.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.5.8
@angular-devkit/build-angular 0.5.8
@angular-devkit/build-optimizer 0.5.8
@angular-devkit/core 0.5.8
@angular-devkit/schematics 0.5.8
@angular/cdk 5.2.4
@angular/cli 6.0.0-rc.6
@angular/flex-layout 5.0.0-beta.14
@angular/material 5.2.4
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.0.0-rc.6
@schematics/angular 0.5.8
@schematics/update 0.5.8
rxjs 5.5.10
typescript 2.6.2
webpack 4.6.0
Repro steps
- Clone this.
- Old .angular_cli.json
...
"scripts": [
....
],
"stylePreprocessorOptions": { <---- !!!!!!
"includePaths": [
"../src/styles/"
]
},
"environmentSource": "environments/environment.ts",
...
- Update CLI to
6.0.0-rc.6
. Runng update
and thenng update @angular/cli --migrate-only --from=1
- Run npm start
Observed behavior
ERROR in Module build failed:
@import "mixins";
^
File to import not found or unreadable: mixins.
Desired behavior
Support for stylePreprocessorOptions or fix ng update because it removes that part from angular.json file.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Add support for angular-cli setting "stylePreprocessorOptions ...
What steps will reproduce the problem? 1. Add an includePath to .angular-cli.json > "apps" > "stylePreprocessorOptions" > "includePaths"
Read more >Angular workspace configuration
Angular CLI supports CSS imports and all major CSS preprocessors: sass/scss and less. See more in the Styles and scripts configuration section.
Read more >@angular/cli - npm
CLI tool for Angular. Latest version: 15.0.4, last published: 2 days ago. Start using @angular/cli in your project by running `npm i ...
Read more >6 Best Practices & Pro Tips when using Angular CLI
Best practices for architecture with Core, Shared and lazy-loaded Feature modules · Using aliases for app and environments folders to support cleaner imports ......
Read more >Generating an app with Angular CLI and preparing i...
Create a new Angular application; Run a development server with LiveReload support to preview your application during development; Add features ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
stylePreprocessorOptions is still supported. You will have to manually update the newly generated angular.json though. Its new place is inside the “options” block of the json. An example config could look like this:
Note the changed path.
I agree that it would be nice if ng update did this automatically.
One thing I found by myself and that can prevent a lot of headache:
For tests running, you must include the same
stylePreprocessorOptions
fromprojects.yourProjectName.architect.build.options
intoprojects.YourProjectName.test.options
, otherwise the same error will appear.I was wondering whether it is a bug or the expected behaviour there.