How to use "styleIncludePaths" ?
See original GitHub issueType of Issue
[?] Bug Report
Description
"styleIncludePaths": {
"description": "Any additional paths that should be used to resolve style imports",
"type": "array",
"items": {
"type": "string"
}
}
I found this schema, but no matter how I try, it doesn’t work. My lib dir structure is like this:
/lib/module/src/styles/index.scss
/lib/module/ng-package.json
And I add styleIncludePaths in ng-packge.json like this:
"lib": {
"entryFile": "src/public_api.ts",
"styleIncludePaths": [
"styles/index.scss" // and I have tried "index.scss" , "src/styles/index.scss", but nothing happened.
]
}
How To Reproduce
No error, but nothing happened.
Expected Behaviour
How do I use it? If it doesn’t work anyway, can u add a “staticAssetsPaths” schema, like angular.json’s architect.build.options.assets ? I think not only me, many developers need to include static resources in the package, such as font icons. I now use Python to do this.
Version Information
$ node_modules/.bin/ng-packagr --version
ng-packagr: latest
@angular/*: latest
typescript: 2.9.2
rxjs: latest
node: latest
npm/yarn: latest
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (2 by maintainers)
Top Results From Across the Web
Angular library - Ng-packagr: entrypoint and styleIncludePaths
I'd like to setup a main entrypoint inside my angular lib so the link is cleaner; I'd like to use styleIncludePaths from ng-packagr...
Read more >use "stylePreprocessorOptions.includePaths" from project.json ...
Nx Workspace: use "stylePreprocessorOptions. ... WEB-58673 Use 'styleIncludePaths' from angular library "ng-package.json" to resolve SASS include paths.
Read more >creating a library that supports Angular Material theming is ...
This means using scss-bundle is no longer necessary. ... in a library edit ng-package.json and a styleIncludePaths setting as shown below.
Read more >ng-packagr - npm
Start using ng-packagr in your project by running `npm i ng-packagr`. ... paths may be configured through the styleIncludePaths option.
Read more >Angular library styleIncludePaths not working - Bountysource
I'm developing two projects in one angular application. One is angular library, in ng-package.json for this library I set styleIncludePaths, ...
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 FreeTop 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
Top GitHub Comments
You need to follow the angular cli schema for libraries. https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_ng_packagr/src/build/schema.json
Those changes need to be added to
ng-packagr.json
I also encountered the same problem…