-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
is it normal that the patch is huge ? #117
Comments
Hi! 👋 👀 no that's not normal. Can you provide a more detailed description of how you modified the contents of your |
Also note that you can be more targeted when making a patch, see the readme section on |
Sure thing! I hope this explanation can help me understand how to create a small patch and what I might have done wrong. To create the above patch I installed the package normally
Then I cloned the fork from another author which includes the PR I wanted to apply: https://github.com/Akhail/plugin-axios.git From that folder I grabbed the src folder and package.json file and copied it over to the installed package inside ./node_modules/@vuex-orm/plugin-axios Since this "PR" includes modifications to the package.json, I then cd'd inside the folder cd node_modules/@vuex-orm/plugin-axios, and ran yarn, followed by yarn build I then cd'd back the root of my project and ran
and that created the 78mb patch file, which works as intended aside from being huge hope that helps! |
Ah, that's not a good way to do it! You're probably adding a bunch of source files and node_modules and build artefacts into the patch file! You should delete the patch file, run yarn/npm, copy the dist/index.js from that PR into the one in your node_modules then run patch-package again. |
ahh! thanks a lot for explaining I just did a do-over, and this time I cd'd into my working folder by using the full path instead of using my dev symlinks that I use all the time this time I only copied the index.js from the dist folder of the PR It created a tiny patch of 328KB instead of one of 78MB I'm also now able to use the latest v6 Perhaps the instructions could be improved to mention that in most cases a user should only modify files inside the dist folder. And the --exclude explanation could include a sample where node_modules is excluded.. just a thought |
thanks for the idea! Maybe I'll do that if other people have similar issues. For now it doesn't seem to be a common problem. Cheers! |
I just used this for the first time.
I cloned a copy of https://github.com/vuex-orm/plugin-axios
applied the changes from this PR: vuex-orm/plugin-axios#8
and then created a patch
It works wonderfully well, however the patch it created is 80mb in size!! It's huge.. specially considering I need to commit it to the repository. It's like 20x bigger than the size of the rest of the committed code
Is this normal? Is there no way around this?
Thanks!
The text was updated successfully, but these errors were encountered: