As we continue our development journey towards Deno 2, this minor release is primarily focused on boosting compatibility with npm and Node.js, enhanci

Deno 1.34: deno compile supports npm packages

submited by
Style Pass
2023-05-25 10:30:07

As we continue our development journey towards Deno 2, this minor release is primarily focused on boosting compatibility with npm and Node.js, enhancing the overall quality of life and developer experience, and establishing the foundation for future performance enhancements.

Ever since v1.6, deno compile has allowed you to compile your project into a single binary executable. This development has proven to be substantial for a multitude of reasons, as it enables developers to:

Since then, we've continued to make deno compile more useful, by adding support for web workers and dynamic imports, and today, by supporting npm packages.

The difference between using deno compile to create an eslint binary and npm install -g eslint is that Deno packages eslint with all of its dependencies and configurations alongside the actual deno executable. This means that the produced executable ensures its dependencies will not be changed by accident and continue working the same way without interference from other dependencies on your system. Additionally, our testing suggests the binaries from deno compile tend to start up faster than executing the same program with dependencies cached locally.

There's more work to improve deno compile, including minimizing total binary size, which we intend to address in upcoming releases.

Leave a Comment