this function indirectly makes the deno or bun runtimes automatically install an npm-package.
doing so will hopefully make it available under your project's "./node_modules/" directory,
allowing esbuild to access it when bundling code.
Important
for the npm-package to be installed to your project's directory,
you must have the "nodeModulesDir" field set to "auto" in your project's "deno.json" configuration file.
otherwise, the package will get cached in deno's cache directory which uses a different file structure from node_modules,
making it impossible for esbuild to traverse through it to discover the package natively.
this function indirectly makes the deno or bun runtimes automatically install an npm-package. doing so will hopefully make it available under your project's
"./node_modules/"
directory, allowing esbuild to access it when bundling code.for the npm-package to be installed to your project's directory, you must have the
"nodeModulesDir"
field set to"auto"
in your project's "deno.json" configuration file. otherwise, the package will get cached in deno's cache directory which uses a different file structure fromnode_modules
, making it impossible for esbuild to traverse through it to discover the package natively.