Skip to content
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

[Module Alias]: Add's module alias to project for DX #6527

Open
2 of 6 tasks
AlexanderMelox opened this issue Dec 3, 2024 · 0 comments
Open
2 of 6 tasks

[Module Alias]: Add's module alias to project for DX #6527

AlexanderMelox opened this issue Dec 3, 2024 · 0 comments
Labels

Comments

@AlexanderMelox
Copy link
Contributor

AlexanderMelox commented Dec 3, 2024

The problem

Most of our files have long relative paths. This looks ugly and is a pain when moving files around because import paths have to be imported as well.

import { pkg } from '../../../../settings';
import uuidv4 from '../../../../global/js/utils/uuidv4';

The solution

Solution is to update our vite config file to allow alias.

import { pkg } from '@settings';
import uuidv4 from '@utils/uuidv4';

Design link

No response

Links to other materials

No response

Owner/main maintainer(s)

n/a

Second/backup maintainer(s)

No response

Product/offering

No response

Business priority

Low Priority = release date is not dependent on fix or not upcoming

Code of Conduct

Acceptance criteria

  • Update our vite config, packages/core/.storybook/main.js
  • Compare against our existing alias for storybook styles
  • Test that alias works across multiple files
  • Double check aliases are removed in build output (es, lib, etc.).

Extra links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog 🌋
Development

No branches or pull requests

2 participants