lucacasonato / esbuild_deno_loader

Deno module resolution for `esbuild`
https://deno.land/x/esbuild_deno_loader
MIT License
160 stars 43 forks source link

Using with Deno Deploy #88

Open adoublef opened 11 months ago

adoublef commented 11 months ago

I wanted to learn how to setup esbuild within Deno Deploy. I have tried the example as stated in the README but I keep getting the following errors

ReferenceError: Worker is not defined
    at startRunningService (https://deno.land/x/esbuild@v0.19.2/wasm.js:1777:5)
    at ensureServiceIsRunning (https://deno.land/x/esbuild@v0.19.2/wasm.js:1758:31)
    at Module.build (https://deno.land/x/esbuild@v0.19.2/wasm.js:1734:26)
    at file:///src/main.ts:8:30

I have tried using the v0.19.2 version of the wasm esbuild (which looks to give me a deno-ts error saying the versions are not compatible) as well as v0.17.19 not working.

Would like to know what I ought to do to resolve link to repo here link to deployed app here

AlexJeffcott commented 11 months ago

I suspect that the deno-ts error would be resolved by https://github.com/lucacasonato/esbuild_deno_loader/pull/78 but for some reason the maintainer has not deployed it.

cowboyd commented 10 months ago

I'm also seeing this error when trying to use esbuild on Deno Deploy.

ReferenceError: Worker is not defined
    at startRunningService (https://deno.land/x/esbuild@v0.19.2/wasm.js:1777:5)
    at ensureServiceIsRunning (https://deno.land/x/esbuild@v0.19.2/wasm.js:1758:31)
    at Module.build (https://deno.land/x/esbuild@v0.19.2/wasm.js:1734:26)
    at buildMain (file:///src/build.ts:6:32)
    at handler (file:///src/main.ts:12:29)
    at ext:deno_http/00_serve.js:442:28
    at ext:deno_http/00_serve.js:647:29
    at eventLoopTick (ext:core/01_core.js:183:11)