#Globally import files for Deno subcommands

2 messages · Page 1 of 1 (latest)

terse flax
#

I’ve looked at Deno docs and searched online to no avail for this answer. Is there a capability in Deno similar to node -r <packageOrFilepath> or some other ability to globally import one or more files for the whole script lifetime? For a concrete example, how would I load a polyfill for a global method to be present in my application code and again for individual test files to ensure the polyfilled method is always available?

sage inlet
#

No, there's no such way right now - unless you use deps.js/ts convention, then you can just import that file in your deps file