-
Notifications
You must be signed in to change notification settings - Fork 53
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
track when a custom type is saved #468
Conversation
@@ -2,18 +2,18 @@ import React from "react"; | |||
import { Box, Button, Spinner, Text } from "theme-ui"; | |||
|
|||
import Header from "../../../../components/Header"; | |||
import useSliceMachineActions from "@src/modules/useSliceMachineActions"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not the first time I see a change of import in your PR, is there a specific reason to do that ?
I mean it's not like the code didn't work before so is it because you prefer relative path ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple reasons.
- some times the alias path is longer.
- my ide doesn't work with them.
- the paths aren't resolved at compile time, so global module resolution is modified by the
module-alias
lib module-alias
doesn't work in projects that use hoisting. Is it possible to use module-alias in a library and NOT require it in the upper project (both Jest and runtime)? ilearnio/module-alias#118- Node can do this natively IMPORTANT: DO NOT USE! Use import mapping instead ilearnio/module-alias#113
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- sometimes the alias path is long ✅
- my ide doesn't work with them 🟥 , pretty sure your IDE should be able to do that
- use of module alias, I do agree that is not a good practice.
Overall, if the path is long I would say ok but here replacing "@src" with "../../../../" doesn't seems right and honestly the aliases looses their purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my ide doesn't work with them 🟥 , pretty sure your IDE should be able to do that
Well it doesn't.
@@ -2,18 +2,18 @@ import React from "react"; | |||
import { Box, Button, Spinner, Text } from "theme-ui"; | |||
|
|||
import Header from "../../../../components/Header"; | |||
import useSliceMachineActions from "@src/modules/useSliceMachineActions"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- sometimes the alias path is long ✅
- my ide doesn't work with them 🟥 , pretty sure your IDE should be able to do that
- use of module alias, I do agree that is not a good practice.
Overall, if the path is long I would say ok but here replacing "@src" with "../../../../" doesn't seems right and honestly the aliases looses their purpose.
Types of changes
Description
Checklist: