Skip to content

Support for @vercel/nft integration with tsdown for file tracing and tree shaking without bundling #203

@productdevbook

Description

@productdevbook

Clear and concise description of the problem

When building server packages like Hono with tsdown, a large node_modules directory is left in the output. This results in unnecessary bulk and inefficiency in the build output. Additionally, when using tsdown, there is no existing support for integrating @vercel/nft for file tracing and tree shaking, which could further optimize the build process.

Suggested solution

Integrating @vercel/nft with tsdown would allow for a more efficient build by breaking down the node_modules into smaller, optimized parts. Specifically, generating a new node_modules inside the dist folder, broken down with @vercel/nft, would significantly reduce the output size and improve project performance. Providing guidance or support for this integration would be highly beneficial.

Alternative

Additionally, when building server packages like Hono, H3, express etc, breaking down node_modules can be incredibly beneficial, and NitroJS already achieves this.

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions