Icons package dependency strategy #6235
alionazherdetska
announced in
Architecture Decisions
Replies: 1 comment
-
|
Resolution |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We're refactoring the post-icon mixin in #6214 to dynamically load icons as
CSS files. This changes how the styles package interacts with the icons package, and we need to determine the appropriate dependency relationship.Current State
@swisspost/design-system-icons/dist/custom-propertiesThe new dynamic loading approach means users need the icons package available at build time. However, we cannot make icons a regular dependency due to pnpm issue #8338 -
transitive dependencies are not installed when using publishConfig.linkDirectory: true.This means when packages like
internet-headerdepend on styles, pnpm won't install the icons package, causing build failures.Available Options
Since regular dependencies don't work in our monorepo setup, we have two viable approaches:
Option 1: Use peer dependencies:
Pros:
Cons:
Option 2: Copy Icons with Build Process(gulp task):
Similar to the existing token copying approach:
Pros:
Cons:
Beta Was this translation helpful? Give feedback.
All reactions