Skip to content

Deploying cloudflare workersscript with esbuild #1309

@jung-kim

Description

@jung-kim

Hi, I've been using esbuild to bundle typescript codes into a single file that is passed into content field of the workersscript with [email protected].
However, this approach no longer works with [email protected] as pulumi up now errors with Binding 'DB' of type 'd1' requires a Worker written in ES module format.

Is there a recommended esbuild config that I should use?? Wrangler seems to be using this esbuild and I'm using same esbuild command and getting requires a Worker written in ES module format error.

Is there another recommended way to bundle workersscript content?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions