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
[BUG] Cannot build library with external SCSS exports #2559
Comments
Have the same issue, can't import folders outside the library. Have the same configuration in ng-packagr |
Is there any intention to fix this? It's already broken for more than a month and no one assigned the ticket. Cannot build without the fix :( |
For the time being you can use the workaround mentioned in angular/angular-cli#23552 (comment) |
Having the same issue with NX incremental build library. Only woking solution is to output the builded lib inside the node_modules. Then the stylesheet get resolved as expected. Seems like something is missing for alias of lib that does not contain the @scope prefix. |
+1 This is also affecting me. |
Hello, any updates? |
+1 This is also affecting me. |
+1 |
Hi all, I was having the similar issue, I managed to workaround by using a relative path( Setup:My setup: two Angular libraries the imported library :
the importing library :
Solution
@import 'libs/libs/ui-styles/scss/file';
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/libs/ui-theme",
"lib": {
"entryFile": "src/index.ts",
"styleIncludePaths": [
"../.."
]
}
}
Hope it helps |
Type of Issue
Description
In our project, we are using
@infragistics
components.All is working well with the app builds only, but not the buildable libraries.
The issue is that
@infragistics
have SCSSexports
property withinpackage.json
that points to the actual file, here's excerpt frompackage.json
of that library:and the library path in
node_modules
is@infragistics/igniteui-angular
.How To Reproduce
Create an angular workspace and a buildable library with
ng-packagr
executor.Add a SCSS file and reference any package's SCSS that is being
export
ed frompackage.json
by alias.Try to build a library.
We use
@infragistics
, it's a paid package from private registry.When the SCSS file is imported directly, like
@infragistics/igniteui-angular/lib/core/styles/themes
, everything works as expected.However if the import points to the alias defined in
package.json
which is@infragistics/igniteui-angular/themes
the following build error appears:Note:
ng-package.json
already contains the needed option:Expected Behaviour
The
ng-packagr
should follow the same build rules as Angular does, by being able to read not only files directly but also by alias.Version Information
The text was updated successfully, but these errors were encountered: