Skip to content

Commit fe909a4

Browse files
committed
fix(build): correct nodeBuildConfig comment to match tsdown ESM default
The previous comment claimed tsdown defaults omitted format to CJS for .ts entries, but tsdown 0.22.1 resolves toArray(format, 'esm') — ESM is the default. Update the comment to accurately describe the explicit format pin as a build-contract consistency and defense-in-depth measure. Part of #91539
1 parent 9802f38 commit fe909a4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tsdown.config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ function nodeBuildConfig(config: UserConfig): UserConfig {
137137
return {
138138
...config,
139139
env,
140-
// Explicit ESM output for the "type": "module" package. Without this,
141-
// tsdown defaults to CJS for .ts entries, producing module.exports
142-
// output that Node.js ignores when loaded via dynamic import() in an
143-
// ESM context — causing bundled-plugin public artifact files (e.g.
144-
// document-extractor.js) to silently export nothing.
140+
// Explicit ESM format pin for OpenClaw's "type": "module" package.
141+
// tsdown 0.22.1 already defaults to ESM for omitted format, so this
142+
// is an explicit build-contract pin for consistency with the existing
143+
// nodeWorkspacePackageBuildConfig() and defense-in-depth against any
144+
// future tsdown default change.
145145
format: "esm",
146146
fixedExtension: false,
147147
platform: "node",

0 commit comments

Comments
 (0)