Skip to content

minification with unbundle results in unoptimized output #447

@sakgoyal

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions