Skip to content

[v3]: Allow the server.ts entry to export other content. #3833

Closed

Description

@medz

Describe the feature

For example, in Cloudflare workers, when combined with workflows, Cloudflare requires exporting the implementation class of WorkerEntrypoint in the entry file. Currently, Nitro 3 does not support exporting from anywhere.

We could create a new entry file and import .output/server/index.mjs, but this has a problem: if we use the same things in the new entry file as in Nitro 3 (e.g., ORM), the code will be packaged and deployed twice.

My workaround is to allow exporting content from server.ts. After a Nitro build, this will also be exported to .output/server/index.mjs.


I'd love to help with this, but I haven't found any documentation or anything related to the Nitro plugin. Of course, I don't want to rely on AI to do it.

Additional information

  • Would you be willing to help implement this feature?

Activity

  1. added
    pending triage
    on Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions