-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
| platform: 'node' // TODO would be great if we could generate ESM and use type = "javascript" |
the following is my current configuration
await esbuild.build({
entryPoints: ['.svelte/cloudflare-workers/entry.js'],
outfile: `${entrypoint}/index.js`,
bundle: true,
target: 'es2020',
platform: 'browser' // TODO would be great if we could generate ESM and use type = "javascript"
});this solves most of my problem when using supabase as they use websocket and other various things
when the project is compiled for node wrangler fail to build it as there is some require(...)
so my question is the following.
is there some reason on why we are using node instead of browser?
because from my understanding the cloudflare workers implements a browser like enviroment. so to me make sense to use a build that is compatible with the browser
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels