You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 1, 2026. It is now read-only.
tsgo incorrectly emits both ESM and CJS exports when compiling .js files containing exports.xxx statements #2527
/** * Greets a user by name. * @param {string} name - The name to greet * @returns {string} The greeting message */exports.greet=functiongreet(name){return`${DEFAULT_PREFIX}, ${name}!`;};
"use strict";/** * Greets a user by name. * @param {string} name - The name to greet * @returns {string} The greeting message */exports.greet=functiongreet(name){return`${DEFAULT_PREFIX}, ${name}!`;};
Behavior with tsgo
"use strict";/** * Greets a user by name. * @param {string} name - The name to greet * @returns {string} The greeting message */exportvargreet=functiongreet(name: string): string{return`${DEFAULT_PREFIX}, ${name}!`;};/** * Greets a user by name. * @param {string} name - The name to greet * @returns {string} The greeting message */exports.greet=functiongreet(name){return`${DEFAULT_PREFIX}, ${name}!`;};
changed the title [-]tsgo incorrectly emits both ESM and CJS exports when compiling `.js` files containing `exports.xxx` statuements[/-][+]tsgo incorrectly emits both ESM and CJS exports when compiling `.js` files containing `exports.xxx` statements[/+]on Jan 16, 2026
Activity
[-]tsgo incorrectly emits both ESM and CJS exports when compiling `.js` files containing `exports.xxx` statuements[/-][+]tsgo incorrectly emits both ESM and CJS exports when compiling `.js` files containing `exports.xxx` statements[/+]jakebailey commentedon Jan 16, 2026
I suspect this is fixed by one of the fixes in #2513
ahejlsberg commentedon Jan 16, 2026
It is indeed.