Google Closure module support in ClojureScript
swannodette.github.io
swannodette.github.io
Because of the whole-program compilation, you couldn't completely remove the JS a user was not allowed to access. While you could still secure the external resources (server), it would expose privileged access points unnecessarily.