swisspost / design-system

The Swiss Post Design System pattern library for a consistent and accessible user experience across the web platform.
https://design-system.post.ch
Apache License 2.0
106 stars 13 forks source link

Implement resolve aliases in storybook #3013

Closed oliverschuerch closed 2 weeks ago

oliverschuerch commented 2 weeks ago

To make imports (of let's say local utils, etc.) simpler, we can add compilerOptions in the tsconfig.json file. This will enable us to do this: import { myUtil } form '@utils/my-util'; instead of this: import { myUtil } form '../../../../utils/my-util';.

### Tasks
- [ ] Add [resolve.alias](https://vitejs.dev/config/shared-options#resolve-alias) to the vite.config.js file
- [ ] Add path aliases to tsconfig.json where usefull
- [ ] Update file imports
gfellerph commented 2 weeks ago

Closing as duplicate of #2881