js_to_oxc
js_to_oxc copied to clipboard
Formatter crashes when the generated code is long
reproduction link: https://kermanx.github.io/js_to_oxc/#N4IglgdgDgrgLiAXCABCg8gIwFYFMDGcAdACa4BmkuACgE4D2UutcAngBS4AeU9LAzgBoUAa1ythwADoQ0aXBBgBbZgENMAG1yIUcWjFyCZclAHNccHeRgRCYerPYBKFNNkmUtCzFqyA+qoA2mKsALoA3MZyAL5R0U7hIIIgUAymtKpKALL0ZEh6Bsmq/HAAQjBgGmS0SCD8uBrkRMVwfpgVVcxJdVCqELUAytQAggByINFAA===
When the code appears with
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return _a[key];
}
});
it will crash and you can't do anything on the page.
Seem to be a problem when the format sets to be true.
Another formatter problem... Not sure how to fix🤔
Just decreased the maximum formattable code length as a workaround 🫠