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

Update style of JS imports to use paths relative to the src directory #526

Open
ravicodelabs opened this issue Sep 3, 2024 · 2 comments
Labels
Refactor Refactoring code

Comments

@ravicodelabs
Copy link
Contributor

Update code to use an import style relative to the src directory, rather than the current approach of using an import style relative to the source file. Using an appropriate parsing method/library, the @ symbol can be a placeholder for the src directory.

For instance, currently we might use: import { setMapCenter } from '../../actions/actions';
After this change, we would have: import { setMapCenter } from '@/actions/actions';

@ravicodelabs ravicodelabs added Clarity Need clarity from Dev. conveners Refactor Refactoring code labels Sep 3, 2024
@gcardonag
Copy link
Contributor

For anyone reading this in the future, we are exploring this update after a dev circle poll to explore alternative options for our imports: https://codeforphilly.slack.com/archives/C03F02LUDJQ/p1725144372740349

@gcardonag
Copy link
Contributor

This will be made easier by work @RNR1 is doing to switch us over from create-react-app to vite-js 🎉

@ravicodelabs ravicodelabs removed the Clarity Need clarity from Dev. conveners label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Refactoring code
Projects
None yet
Development

No branches or pull requests

2 participants