Well wait, why not have the real important logic done server side, you can have a nodejs back end, hide the API calls and what's sent and that's that.
Sorry but complaining about front end code being copied is, I don't know, if you want the business logic secure, can't be on the front end.
Am no lawyer no do I care, but yeah front end code can't be safe from copying, it's served as a document.