e379aeb151
In JS, when you assign `module.exports = exports` and the entire module is wrapped in an IIFE, the resulting `export=` symbol, after following aliases, is the module itself. This results in trying to merge the file's exports with itself inside `getCommonJsExportEquals`, since it thinks that it has found new exports, possibly in an object literal, that need to be merged with the file's exports. For example: ```js (function() { exports.a = 1 module.exports = exports })() ```
11 lines
232 B
TypeScript
11 lines
232 B
TypeScript
// @noEmit: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @Filename: Eloquent.js
|
|
// bug #27365, crashes from github.com/marijnh/Eloquent-JavaScript
|
|
(function() {
|
|
exports.bigOak = 1
|
|
exports.everywhere = 2
|
|
module.exports = exports
|
|
})()
|