Skip to content

result code being wrapped by src dir in unbundle mode #831

@alpheusmtx

Description

@alpheusmtx

Reproduction link or steps

https://github.com/alpheusmtx/tsdown-unbundle-src-wrapped

What is expected?

what is expected:

./src/index.ts -> ./dist/index.js
./src/sub.ts -> ./dist/sub.js

What is actually happening?

what is actually happening:

./src/index.ts -> ./dist/index.js
./src/sub.ts -> ./dist/src/sub.js

Any additional comments?

The situation only happened when the entry option being declared as an object instead of string:

// ok

import { defineConfig } from "tsdown";

export default defineConfig({
    entry: "./src/index.ts",
});
// not ok

import { defineConfig } from "tsdown";

export default defineConfig({
    entry: {
        index: "./src/index.ts",
    },
});

Metadata

Metadata

Assignees

No one assigned

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions