PathIntellisense icon indicating copy to clipboard operation
PathIntellisense copied to clipboard

Absolute path with package.json trick

Open Noitidart opened this issue 8 years ago • 1 comments

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

Noitidart avatar Jul 18 '17 14:07 Noitidart

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"

milahu avatar Oct 23 '22 11:10 milahu