Skip to content

Commit d47cef2

Browse files
committed
Set ts to module.exports to fix monaco
1 parent 9eb0f73 commit d47cef2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Herebyfile.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function createBundler(entrypoint, outfile, taskOptions = {}) {
209209
};
210210

211211
if (taskOptions.exportIsTsObject) {
212-
options.footer = { js: `})(typeof module !== "undefined" && module.exports ? module : { exports: ts });` };
212+
options.footer = { js: `})(typeof module !== "undefined" && module.exports ? (ts = module.exports, module) : { exports: ts });` };
213213

214214
// esbuild converts calls to "require" to "__require"; this function
215215
// calls the real require if it exists, or throws if it does not (rather than

0 commit comments

Comments
 (0)