Skip to content

addNodeProtocol: reverse option towards removeNodeProtocol #331

@ryoppippi

Description

@ryoppippi

Clear and concise description of the problem

I'd like tsdown to add node: prefix to builtin module in Node.js automatically.
tsdown has removeNodeProtocol but this is the opposite option.

Currently I'm using rollup-plugin-node-externals, but I prefer using this operation with adding a single option to tsdown.

Suggested solution

I suggest to add a new plugin which is similar to rollup-plugin-node-externals internally.
Also we can exports the option of rollup-plugin-node-externals to manage the node prefix. They supports builtinsPrefix option (builtinsPrefix?: 'add' | 'strip' | 'ignore')

Alternative

No response

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