You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i am using multiple package.json in react native and i was wondering whether its currently possible to use the package name instead of the the local path when import-js adds a package.
For example in the folder src/constants/package.json looks like this.
{
"name": "@constants"
}
Furthermore lets assume i have a file src/constants/colors.js that exports colors. Lets say i want to use colors in src/components/myfile.js
Then import-js suggests
import colors from '../constants/colors.js'
What i would like to have is '@constants/colors.js'. Is there a way to do that and if not, how would you like this to be implemented. Can we use this as a default option or would we need a property in the .import-js config?
The text was updated successfully, but these errors were encountered:
Interesting, I have never used local names like these. I think this could be implemented as a new default, but a quick-fix would be to use moduleNameFormatter to reformat the module name before imports are written to file.
Hi, i am using multiple package.json in react native and i was wondering whether its currently possible to use the package name instead of the the local path when import-js adds a package.
For example in the folder src/constants/package.json looks like this.
Furthermore lets assume i have a file src/constants/colors.js that exports colors. Lets say i want to use colors in src/components/myfile.js
Then import-js suggests
What i would like to have is '@constants/colors.js'. Is there a way to do that and if not, how would you like this to be implemented. Can we use this as a default option or would we need a property in the .import-js config?
The text was updated successfully, but these errors were encountered: