Skip to content

Adding SVGs to the ui-lib #271

Answered by belgattitude
dahaca asked this question in Q&A
Aug 16, 2021 · 2 comments · 10 replies
Discussion options

You must be logged in to vote

Hey @dahaca it depends if you want to publish ui-lib outside of the monorepo...

If you don't have to straight away I would simply

.
├── apps
│   └── web-app                 
│       └── tsconfig.json     (here we have to ensure correct paths)
├── packages
    └── ui-lib      
        └── src
            └── icons
               ├── index.ts (optional barrel to regroup all icons)
               └── play.svg (and all others...)

Then ensure the consuming has the path aliases defined in its tsconfig

{
  "compilerOptions": {
    "baseUrl": "./src",
    "paths": {
      // Hey Notice the '*', it will allow to impor from ui-lib subdirectories
      "@your-org/ui-lib/*": [
        "../../../pac…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by belgattitude
Comment options

You must be logged in to vote
10 replies
@belgattitude
Comment options

@dahaca
Comment options

@belgattitude
Comment options

@dahaca
Comment options

@belgattitude
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants