-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Local development workflows / local package linking #405
Comments
Here's the awkward solution that I found. Obviously this doesn't really scale to a lot of packages at once, but this was about testing a new implementation without wanting to cut a release before validating it in a production app. First, I marked the packages in question as being provided by nodemodules. In my
Then, I had to actually copy the files into place. This is the part that makes this setup extra awkward. I added this to my build steps to copy the package I was working on into place.
I think this was particularly awkward because we had a mix of nodemodules and JSPM.io provided packages but it did work and once I settled on this approach I didn't have to manually enumerate dependencies of the two packages above (as I did when I manually resolved them to a path!) I'm not sure what the best approach would be. Possibly I should move the whole project to using Perhaps there would be an approach that would pair with a CLI command to copy the necessary files into the expected place, or I could modify the plugin accordingly? Maybe a dev server (I don't love that, feels too complicated). Anyway, this worked! It might be worth at least documenting the approach somewhere. |
Does this same workflow work without the copy step if you symlink the This would effectively be the traditional Another alternative might be through the package.json dependencies: {
"dependencies": {
"@automerge/automerge-repo-react-hooks": "file:../automerge-repo/packages/react-hooks",
"@automerge/automerge-repo": "file:../automerge-repo/packages/automerge-repo"
}
} where JSPM will use these resolutions instead of the CDN resolutions, and therefore should avoid the need for the One issue with the above workflow though is it may not correctly dedupe other importers - perhaps having better local dependency override systems could help with that. |
When working with local packages, there's no workflow to selectively apply the
node_modules
provider just for packages in development.Perhaps if we had a way to provide a selection like this, that might work well with a standard npm dev workflow. Alternatively sepecifying the full path to the development overrides.
Altermatively, perhaps the recommended way to do this should just be with resolutions properly supporting
file:../local-pkg
style local resolutions?This was brought up by @pvh that further polishing of these workflows is needed.
The text was updated successfully, but these errors were encountered: