Import from variable path?
Howdy - I'm trying to make my Cloudflare Workers app self-hostable in a Docker Container.
To do this, I'm going to run it with Deno when self-hosting.
Ideally I would like to change none of my actual application code and defer any environment-specific setup to different files.
i.e.:
And then:
I know this doesn't work, so my question is how do I achieve something like this?
Ultimately the problem is I can't be requiring Deno packages in cloudflare workers or vice versa.
To do this, I'm going to run it with Deno when self-hosting.
Ideally I would like to change none of my actual application code and defer any environment-specific setup to different files.
i.e.:
And then:
I know this doesn't work, so my question is how do I achieve something like this?
Ultimately the problem is I can't be requiring Deno packages in cloudflare workers or vice versa.
