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

"tsup-node" doesn't respect "noExternal" configuration #718

@eric-burel

Description

@eric-burel

Hi,

I've been using "tsup-node to exclude all packages" with great pleasure to build some scripts while excluding all node_modules.

I am refactoring a monorepo, and I am in the special case where I have internal NPM packages that expose pure .ts code.
Therefore, I need those specific packages to be included in the build, despite being listed in the package.json.

The use case is pretty close to what's described for next-transpile-modules: https://www.npmjs.com/package/next-transpile-modules "code transpilation from local packages (think: a monorepo with a styleguide package)".

What's the equivalent in Tsup? How can we forcibly reinclude some packages while using tsup-node?

Here is an example: Devographics/Monorepo#117, the scripts are built in the "surveyform" directory, alongside the Next app. Package "core-models" lives in the shared folder, you can see how the package.json let's us expose pure TS files. I need this specific package to be bundled despite it being listed in package.json as a dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions