Ways to ignore error from git submodule
I have some submodule in a monorepo, but it's not required for pages to build the app. Can I ignore submodule from clone or just ignore the error from build process in pages?
6 Replies
Git submodules are fine to use inside your walled garden, but do not expect anything outside to work with them gracefully.
Haha, but Pages supports Git submodules by default, so they should be well-supported.
Even I try to add
ignore = all
to .gitmodules
, it still try to clone and error.The madness (submodules) is spreading, this is concerning 🙂
My monorepo has a submodule which > 2GB size and this is not required for building my application on Pages, so I just want to ignore it when clone. Do you have any better solution on this?
I do not know your exact setup but
wrangler deploy
should work fine from inside your monorepo. In doubt switch to a GitHub Actions based deployment which uploads the artifacts instead of relying on Cloudflare trying to do the right thing the other way around.
This way you should be able to stop this submodule madness from spreading further.Yes, i am using this solution right now 🤣