Skip to content

🚀 Feature Request: Esbuild External #6231

@emersonlaurentino

Description

@emersonlaurentino

Describe the solution

Add support to configure external libs to esbuild config.

Explanation:

Currently, I'm using the @node-rs/argon2 dependency, and I'm receiving this error when run the command wrangler dev:

Could not resolve "@node-rs/argon2-wasm32-wasi"

    node_modules/@node-rs/argon2/browser.js:1:14:
      1 │ export * from '@node-rs/argon2-wasm32-wasi'
        ╵               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "@node-rs/argon2-wasm32-wasi" as external to exclude it from the bundle, which will remove this error.

The solution is adding this lib to external on esbuild config, but we can't because we don't have access to esbuild config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions