axeldelafosse / expo-next-monorepo-example

Create a universal React app using Expo and Next.js in a monorepo

Home Page:https://expo-next-monorepo-example.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSCode Intellisense

jcarraway opened this issue · comments

Hello! First, thank you for all of the work on this repo.

I was wondering if you have intellisense working for VSCode? When writing code in the App package intellisense works fine for other code written in the same package (ex: importing a customized button), but it doesn't work for any of the packages installed in the Expo package (react native, dripsy, etc.). If I install the package in the App package (understood that I should not do this) then everything works as expected, but I'm hoping there's an easy fix that I'm missing.

Thanks!

I wrote a guide about this, since I faced the same thing: https://github.com/nandorojo/ts-monorepo-autoimport-guide

I recommend reading the comment thread on the issue I linked to at the bottom to understand how autoimport works in VSCode for a monorepo. Long story short: any dependencies you want to auto-import in app need to be in app's package.json. By using yarn lernaupdate instead of yarn add, you can manage adding the exact same versions to both app and expo.

Got it - very helpful info and confirmed solution. Thanks!