-
-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
Version
System:
OS: macOS 26.2
CPU: (16) arm64 Apple M3 Max
Memory: 3.42 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Browsers:
Chrome: 145.0.7632.160
Safari: 26.2
npmPackages:
@rslib/core: ^0.19.6 => 0.19.6Details
src/index.ts
import "./check";
import * as util from "node:util";
console.log(util.styleText);src/check.ts
function checkNodeVersion() {
const [major] = process.versions.node.split(".");
if (parseInt(major) < 20) {
throw new Error("Node.js version must be >= 20");
}
}
checkNodeVersion();Expected output (esbuild output)
// src/check.ts
function checkNodeVersion() {
const [major] = process.versions.node.split(".");
if (parseInt(major) < 20) {
throw new Error("Node.js version must be >= 20");
}
}
checkNodeVersion();
// src/index.ts
import * as util from "node:util";
console.log(util.styleText);
Current output (Rslib)
import { styleText } from "node:util";
function checkNodeVersion() {
const [major] = process.versions.node.split(".");
if (parseInt(major) < 20) throw new Error("Node.js version must be >= 20");
}
checkNodeVersion();
console.log(styleText);
Reproduce link
https://github.com/chenjiahan/rslib-repro-import-order
Reproduce Steps
- pnpm i
- pnpm build
- pnpm build:esbuild
Reactions are currently unavailable