-
Notifications
You must be signed in to change notification settings - Fork 43
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
Question on Dev Workflow - npm link
?
#459
Comments
Can you please describe the problem you're trying to solve? The dev app links the package directly from the source (see the webpack config) |
Yes! Here is a description of the problem, phrased as a user story:
Current behavior: this feature doesn't work, because only Webpack knows how to resolve the imports. If symlinks were used, as in NPM workspaces or Initially seeing the imports, I did not assume Webpack was configured in any special way, and that the code changes would not propagate, because Go To Definition took me into What I ExperiencedThe problem is a developer experience issue where when you try to follow the imports to their definition in VSCode, like this, it resolves to Following it to the definition in VSCode lands you in a For example, I wanted to inspect the source code that defines Then I'm left staring down the results list and clicking through multiple ones to try to figure out if it's the thing that was imported. The only ones that actually match in those search results are these, which are for Vue and Svelte, not React. I spent way too long scrolling up and down that list, only to navigate from the src tree and see if I could find it that way. Eventually I did find it, defined in Suggested ImprovementLet's somehow get the symlinks to work, so that when you follow a definition in VSCode, it takes you straight to the definition, not to a dead-end I do see this config here in I feel like this is worth doing, if only just for my own sanity stepping into this codebase. I will see if Thanks for asking for clarification! |
I don't see this problem on my end. Do you have it everywhere in
Where was some problem with having |
Oh interesting... I wonder if there's some additional VSCode extensions that make it work that I need to install. I see these issues everywhere in the |
@curran Since it points to the built version of We can probably solve that by using TypeScript Project References or by using path aliases, but it'll require some experimentation. |
I notice that the examples under
packages/dev
import things from the Unovis NPM package, for example:My question is, how do Unovis developers test their changes? Is everyone using
npm link
to link the NPM packages to the local source files?It may be cleaner to leverage NPM workspaces for this, so
npm link
would not be required.The text was updated successfully, but these errors were encountered: