You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've been trying to incorporate the Carbon Components package into our Angular 17 project in which we use standalone components, but by following
the initial steps in the README, at the moment we try to build/serve our project the compiler throws an error indicating
that it cannot resolve the paths to the included IBM Plex fonts.
The issue is reproducible even in older versions of Angular 17, but if we downgrade to Angular 16 the steps work as intended.
Angular CLI Version:
Carbon Components Angular version: "^5.16.4"
Here is the link for a minimal repo on which the issue is reproducible.
Notes
We suspect that there is a slight possibility that the problem may come from upstream: angular/angular-cli#27007 , but we're interested in workarounds if other teams have faced this problem.
The text was updated successfully, but these errors were encountered:
@Hrothgar32 Thanks for pointing this out, we have to update our documentation to include this:
@use'@carbon/styles/scss/config'with (
$use-flexbox-grid: true,
$font-path: '@ibm/plex'// Since Angular doesn't support `~` imports anymore, we can rewrite the path by updating the config
);
Including $font-path: '@ibm/plex in your configuration should resolve this issue.
I've tried your configuration and it resolved the compilation issue, however the styles weren't applied when I imported the modules and used the directives. However importing like this:
@use "@carbon/styles" with (
$font-path: '@ibm/plex'
);
Solved the compilation issue, and the styles were applied as well!
@use'@carbon/styles/scss/config'with (
//Useflexboxforgrid-sticktoCSSGridorFlexbox
// CSS Grid has become the default grid system in v11
$use-flexbox-grid:true,
$font-path:'@carbon/styles/node_modules/@ibm/plex'
);
Detailed description
Hello!
We've been trying to incorporate the Carbon Components package into our Angular 17 project in which we use standalone components, but by following
the initial steps in the README, at the moment we try to build/serve our project the compiler throws an error indicating
that it cannot resolve the paths to the included IBM Plex fonts.
The issue is reproducible even in older versions of Angular 17, but if we downgrade to Angular 16 the steps work as intended.
Angular CLI Version:
Carbon Components Angular version: "^5.16.4"
Here is the link for a minimal repo on which the issue is reproducible.
Notes
We suspect that there is a slight possibility that the problem may come from upstream: angular/angular-cli#27007 , but we're interested in workarounds if other teams have faced this problem.
The text was updated successfully, but these errors were encountered: