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

Absolute path with package.json trick #86

Open
Noitidart opened this issue Jul 18, 2017 · 1 comment
Open

Absolute path with package.json trick #86

Noitidart opened this issue Jul 18, 2017 · 1 comment

Comments

@Noitidart
Copy link

If we include a package.json we are able to use absolute paths. It would be so awesome if this extension was able to do intelli sense for that! Here is an article that explains the package.json absolute path trick - https://medium.com/@davidjwoody/how-to-use-absolute-paths-in-react-native-6b06ae3f65d1

@milahu
Copy link

milahu commented Oct 23, 2022

medium.com article

tldr: create packages for your modules

modules/x/package.json

{ "name": "x" }

somewhere/else/index.js

-import x from "../../modules/x/index.js"
+import x from "x/index.js"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants