With this input:
import fs from 'node:fs';
fs.open
output by --bundle --format=esm --platform=node --target=node18
import fs from "node:fs";
fs.open;
output by --bundle --format=esm --platform=node --target=node18,es2022
import fs from "fs";
fs.open;
playground link
With this input:
output by
--bundle --format=esm --platform=node --target=node18output by
--bundle --format=esm --platform=node --target=node18,es2022playground link