Skip to content

Inconsistent path separators in logs on Windows #358

@outslept

Description

@outslept

Reproduction link or steps

  1. package.json
echo '{"name":"foo","scripts":{"build":"tsdown"},"devDependencies":{"tsdown":"^0.12.9"}}' > package.json
  1. Create source file
mkdir src && echo 'export const test = "hello"' > src/index.ts
  1. Install and build
pnpm install && pnpm run build

Run on Windows - observe inconsistent path separators in logs.

What is expected?

Consistent path separators in build logs. Since config & docs uses forward slashes, logs should show:

ℹ entry: src/index.ts
...
ℹ dist/index.mjs

What is actually happening?

ℹ entry: src\index.ts     ← backslash
ℹ dist/index.mjs          ← forward slash

Entry path uses backslashes while output path uses forward slashes, despite config specifying forward slashes.

Any additional comments?

First level uses forward slashes, but nested paths use backslashes.

Build works correctly, it's a cosmetic issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions