Skip to content

Consider removing unstable "node:module".stripTypeScriptTypes to reduce baseline SEA binary size #57744

Open
@dsherret

Description

@dsherret

I think it would be beneficial to consider not stabilizing stripTypeScriptTypes and instead require users to specify a dependency on swc or whatever library they wish.

Reason: This enables Node single executable applications to stay small and not have every binary have a dependency on swc. Instead users can choose to increase their binary size by specifying a dependency only when they need it and not always.

Sure, current design constraints might mean it's currently always required, but in the future work could be done on Node to make this not the case. For example in Deno our single executable applications are custom smaller binaries that do not include swc and we do all the transpiling work up-front when compiling instead of at runtime.

An alternative to this could be making it opt-in to include this API in single executable applications, but overall I think it's much simpler to just require users to specify a dependency because this is a niche use case and also it makes code work the same way across different versions of Node.

Metadata

Metadata

Assignees

No one assigned

    Labels

    strip-typesIssues or PRs related to strip-types support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions