If they allow WASM then yes.
But even if restricted to true js, you can minify it. Which reduces the information content to about that you'd get out of a good disassembler.
Websites all over the world allow users to poke at the source and a lot of apps have significant chunks of easily accessible js and the sky hasn't fallen in. A few idiots will rip you off. But that was always the case. And they lose access to new features and support.