-
Notifications
You must be signed in to change notification settings - Fork 80
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
Publishing / Testing local formik-antd fork from another Local Project #4
Comments
Just using npm for local package references (via npm install file:... for example) sucks. The setup will most likely end up with two versions of each library you are using (for example two versions of react and two versions of formik) and then above error can occur. You can use lerna for a sophisticated setup. Im actually writing a blog post about it. The idea is you have one application project and one module project (in this case formik-antd). |
That sounds super useful but I feel like it's a bit overkill just for a quick test. Perhaps if there was a dev mode for this project that I could develop features on. |
It may sound a bit overkill. Especially finding a practical setup is hard and it took me quite some time. As seen in https://github.com/jannikbuschke/formik-antd-playground this is a powerful setup and it actually is pretty easy to use. I just published a blogpost about the setup: https://www.jannikbuschke.de/blog/monorepo-with-lerna-react-and-typescript/ You can combine it with git submodules (https://www.jannikbuschke.de/blog/git-submodules/). This would allow you to include formik-antd by its source, so you don't need to wait for new releases. |
Thanks for this, I'm definitely going to check out the blog post. Your original link was just this repo 😛 |
correct :) |
@jannikbuschke Trying to test #68 locally, but the changes for modular imports seem to break the lerna playground... Any insight? Thanks :) |
Y, something seems to be broken. |
Actually it works for me. I deleted /lib and /es folders,
|
@jannikbuschke are you using the modular imports + the babel plugin? |
I would recommend to test against master without modular imports + babel plugin. |
@jannikbuschke would you happen to know what is causing the error below? |
@pavanagrawal123 this happens if some library (either react or formik in this case I think) is brought in twice by the packages. This is why we need to run |
I was considering adding some PRs but I like to be able to test local changes in my current project prior to submitting the PR.
I know in package.json you can reference another local file / directory as the source of the node module but I tried it and it doesn't seem to build well.
I get errors like
If I use the normal package installed via npm itself, I don't get these errors.
Maybe I need to publish / build the project first? Not sure.
The text was updated successfully, but these errors were encountered: