-
-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Version
System:
OS: macOS 26.3
CPU: (12) arm64 Apple M2 Max
Memory: 467.14 MB / 96.00 GB
Shell: 4.5.0 - /opt/homebrew/bin/fish
Browsers:
Chrome: 145.0.7632.117
Firefox: 137.0.1
Safari: 26.3
npmPackages:
@rslib/core: ^0.19.6 => 0.19.6Details
// index.js
import { foo } from './foo.js'
export async function main() {
const { fooVersion } = await import('./version.js')
foo(fooVersion)
}// foo.js
export function foo(bar) {
return bar
}
export const version = 'fooooooooo' /** Avoid const inline */// version.js
export { version as fooVersion } from './foo.js'Reproduce link
https://github.com/colinaaa-reproductions/rslib-repro-undefined-export
Reproduce Steps
pnpm installpnpm build
You will see the incorrect output like this:
function foo(bar) {
return bar;
}
const version = 'fooooooooo';
async function main() {
const { fooVersion } = await import("./900.js").then((mod)=>({
fooVersion: mod.version
}));
foo(fooVersion);
}
export { main, version };where 900.js does not have any export
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels