这是indexloc提供的服务,不要输入任何密码
Skip to content

Support opt out external package deps. #1344

@wenerme

Description

@wenerme

By default tsup bundles all import-ed modules but dependencies and peerDependencies in your package.json are always excluded, you can also use --external <module|pkgJson> flag to mark other packages or other special package.json's dependencies and peerDependencies as external.

My use case is build main.ts to main.mjs, then copy the main.mjs to container and distribute the single file.

I used to use swc then esbuild for this, I only need to maintain an external list.

I want to replace the pipeline to tsup (tsup gives better source map, single step, easier to config).

I hope tsup support optout external the package.json, support some flag to opt out default externals.

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