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

There will be temporary tsup.config.bundled_* files created during build #1349

@JackRobards

Description

@JackRobards

This file seems get created during the build process, when running a command like pnpm run build. It's full name is something like tsup.config.bundled_oddsrgxefg.mjs

The reasons this can be troublesome are:

  1. If there is a parallel task (like a linter), then it can pick up this temporary tsup.config.bundled_* file and try to lint it.
  2. If the tsup command fails to clean up this file for some reason, then it can be left around and will need to be manually deleted.

You can work around this by adding this temporary file to the .gitignore, but it would be nice if this file was written somewhere that would be less likely to potentially interfere with other tooling.

tsup config:

import { defineConfig } from 'tsup';

export default defineConfig({
  entry: ['index.ts'],
  splitting: false,
  dts: true,
  clean: true,
  format: ['esm'],
});

Version: "tsup": "8.4.0"

When using Vite, there also used to be a similar issue that they have since resolved by writing these temporary files to the node_modules directory. Might tsup be able to do something similar?
vitejs/vite#18509

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