Skip to content

Should hono types be dependencies? #1219

@krassowski

Description

@krassowski

Checks

Describe the bug (be clear and concise)

Downstream when compiling with TypeScript with the latest v4.0 beta versions we see:

Error: node_modules/.../http-proxy-middleware/index.d.ts(8,30): error TS2307: Cannot find module '@hono/node-server' or its corresponding type declarations.
Error: node_modules/.../http-proxy-middleware/index.d.ts(9,35): error TS2307: Cannot find module 'hono' or its corresponding type declarations.

manually installing adding '@hono/node-server' and hono solves it but that's not really our dependency.

Step-by-step reproduction instructions

1. Install
2. Compile

Expected behavior (be clear and concise)

  1. Is there a way to keep hono support only for those who care without enforcing installing hono dependencies?
  2. If not, should hono dependencies be moved from devDependencies to dependencies to avoid TypeScript declaration check errors?

How is http-proxy-middleware used in your project?

As a dependency of `@rspack/core`

What http-proxy-middleware configuration are you using?

I am not

What OS/version and node/version are you seeing the problem?

Irrelevant

Additional context (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions