Skip to content

minification with unbundle results in unoptimized output #447

Open

Description

@sakgoyal

Reproduction link or steps

https://github.com/sakgoyal/case-anything/tree/tsdown

  1. command run: tsdown --dts --sourcemap --minify --unbundle
  2. check the index.d.ts file
  3. check the index.js file

What is expected?

// index.d.ts
export { adaCase, /** ... */ upperCase } from "./core.js";
//index.js
export {adaCase, /** ... */ upperCase} from "./core.js";

What is actually happening?

// index.d.ts
import { adaCase, /** ... */ upperCase } from "./core.js";
export { adaCase, /** ... */ upperCase };
//index.js
import{adaCase as e,/** ... */ upperCase as m} from"./core.js";
export{e as adaCase,/** ... */ m as upperCase};

The d.ts file could be shorter to make it more "optimized"

Any additional comments?

Not really sure what to title the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions