Currently, there is a dependency to NPM for code obfuscation.
You could at least implement minification like with this code:
https://bitbucket.org/egrange/dwscript/src/master/Libraries/JSCodeGen/dwsJSMin.pas
Since v1.5, the dependency to npm for obfuscation is removed.
This feature was implemented.