Open reosablo opened 4 months ago
The docs state that the portable loader requires --allow-read and/or --allow-net, but the former is always required in fact.
--allow-read
--allow-net
This seems to be because of the Deno.cwd() call.
Deno.cwd()
https://github.com/lucacasonato/esbuild_deno_loader/blob/ccd8992c690deee821d6b7a7efeaf599722c394c/src/plugin_deno_loader.ts#L187-L190
The workaround for this issue is to specify a dummy absWorkingDir value in the esbuild configuration.
absWorkingDir
const result = await esbuild.build({ // ... // required to avoid read permission of CWD by esbuild_deno_loader absWorkingDir: "/", });
I encountered this problem when using this plugin in Val Town, which does not allow read permissions.
The docs state that the portable loader requires
--allow-read
and/or--allow-net
, but the former is always required in fact.This seems to be because of the
Deno.cwd()
call.https://github.com/lucacasonato/esbuild_deno_loader/blob/ccd8992c690deee821d6b7a7efeaf599722c394c/src/plugin_deno_loader.ts#L187-L190
The workaround for this issue is to specify a dummy
absWorkingDir
value in the esbuild configuration.I encountered this problem when using this plugin in Val Town, which does not allow read permissions.