Replies: 1 comment 4 replies
-
Ah yeah Anyway, I'm not totally sure why the deploy with Arc wouldn't run the patch, but it might be possible to move and patch as part of the deploy. We do something similar in the arc.codes project to reduce the size of the highlight.js dependency https://github.com/architect/arc.codes/blob/main/scripts/dist.sh There's also a call to that script on sandbox startup so it works locally https://github.com/architect/arc.codes/blob/main/prefs.arc |
Beta Was this translation helpful? Give feedback.
-
I've been trying to deploy a patched third-party node module in a http route, but the original pre-patched version is deployed instead.
I made a small change to a module, and saved the patch using https://github.com/ds300/patch-package. This seems to be a really neat way to make a minor change to a module. After adding the
"postinstall": "patch-package"
NPM script, my patch gets applied any timenpm i
is called, and I can see my change in the project levelnode_modules
directory.My http function does not have a package.json, so I'm relying on
arc
to work out the dependencies. When Iarc deploy
, however, my function gets the original module, pre-patch. I had assumed the project level modules would get deployed, but it looks like these modules are cached elsewhere.Despite searching the various architect repositories, I couldn't work out how/why this was happening. Any suggestions on how to make this work?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions