Apologies if this is not the right forum to ask this question but after researching for a while, deno_emit seems to be the tool I need to achieve my goal (though I could be wrong).
I'm working on a smart home style product that a customer buys which includes a Raspberry Pi. I've made a Deno script that takes requests from a phone app and adjusts the smart home device. Initially I thought that using Deno compile would hide my source code, but opening up the Deno compile output in a text pad, my source code is easily readable, so I need a way to at least minify my code before deploying it to the Raspberry Pi.
I did read through the issues about minification and know it's not the goal of Deno to have a fully fledged bundler, so I gave esbuild a go but I don't think my use case of minifying deno code to then run with either a Deno exe or Deno run is supported. I was getting 'dynamic require not supported' errors and I couldn't see any other esbuild settings that could resolve that issue.
I've tried to bundle with deno emit and I'm unable to bundle due to node: specifiers not being supported yet, but say that is fixed and I am able to bundle, if I use the deno emit bundle options to minify, would my code be (somewhat) obfuscated and able to run with Deno or am I better off using different tools to achieve my goal?
Apologies if this is not the right forum to ask this question but after researching for a while, deno_emit seems to be the tool I need to achieve my goal (though I could be wrong).
I'm working on a smart home style product that a customer buys which includes a Raspberry Pi. I've made a Deno script that takes requests from a phone app and adjusts the smart home device. Initially I thought that using Deno compile would hide my source code, but opening up the Deno compile output in a text pad, my source code is easily readable, so I need a way to at least minify my code before deploying it to the Raspberry Pi.
I did read through the issues about minification and know it's not the goal of Deno to have a fully fledged bundler, so I gave esbuild a go but I don't think my use case of minifying deno code to then run with either a Deno exe or Deno run is supported. I was getting 'dynamic require not supported' errors and I couldn't see any other esbuild settings that could resolve that issue.
I've tried to bundle with deno emit and I'm unable to bundle due to node: specifiers not being supported yet, but say that is fixed and I am able to bundle, if I use the deno emit bundle options to minify, would my code be (somewhat) obfuscated and able to run with Deno or am I better off using different tools to achieve my goal?
Thanks for any guidance, Leon.