Skip to content

[Bug]: Sourcemap is not generated for entry file which only do reexport in bundleless mode #942

Open
@Timeless0911

Description

@Timeless0911

Version

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 371.86 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 135.0.7049.96
    Safari: 17.6
  npmPackages:
    @rslib/core: ^0.6.5 => 0.6.5

Details

In bundleless mode, if we enable sourcemap generation, the source file which contain only reexport statement do not generate source map file.

// foo.ts
export const foo = "foo";

// index.ts
export { foo } from "./foo";

Reproduce link

https://github.com/Timeless0911/rslib-reexport-sourcemap

Reproduce Steps

  1. pnpm install
  2. pnpm build
  3. check dist/bundleless folder that the index.js.map is missing which exists in dist/bundle folder.

The output result is as below:

dist/
├── bundle
│   ├── index.js
│   └── index.js.map
└── bundleless
    ├── foo.js
    ├── foo.js.map
    └── index.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    RspackRspack related issue

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions