Closed nvh closed 1 year ago
Thanks for posting, I can confirm this is triggering a stack overflow in the build process, and have a test case for it. Will hopefully be able to get a fix out on the weekend.
The issue seems to be here in complex.js
. For some reason when the DEW plugin handles the ReferencedIdentifier
"Object" the scope's parent is equal to the scope itself, which causes an infinite loop. Struggling to reproduce on AST explorer, where the same referenced identifier has a well-behaved scope 🤔
^ for example, this is triggered by complex.js
Reproduction of the bug is running the plugin on:
(function(root) {
function Complex() {}
if (typeof define === 'function' && define['amd']) {
define([], function() {
return Complex;
});
} else if (typeof exports === 'object') {
Object.defineProperty(Complex, "__esModule", { 'value': true });
Complex['default'] = Complex;
Complex['Complex'] = Complex;
module['exports'] = Complex;
} else {
root['Complex'] = Complex;
}
})(this);
(closing as this was resolved on the builder)
Reopening pending the builder update.
This is finally working at https://generator.jspm.io/#U2RhYGBkDM0rySzJSU1hSM7PLchJrdDLKnYw0jPUMwQA/m2L2R8A.
Reporting CDN Build Error.