Description
I have a foreing.js with the code:
exports.fn = (
x, y
) => {
};
and the compiler while bundling turns it into doesn't respect existing formatting of brackets and arrows:
(function(exports) {
exports.fn = (
x, y)
=> {
};
})(PS["BadForeign"] = PS["BadForeign"] || {});
putting ) not in the same line as the =>.
While this code is totally legal JS this just cased the problem for me while building with ncc: vercel/ncc#721
To Reproduce
Create a module with a foreign code above and bundle. (purs bundle ./output/BadForeign/*.js -o bad-bundle.js)
Expected behavior
Respect (at least not break in this strange way) the existing formatting of the foreign module code?
Additional context
PureScript version
0.14.2
Description
I have a foreing.js with the code:
and the compiler while bundling turns it into doesn't respect existing formatting of brackets and arrows:
putting
)not in the same line as the=>.While this code is totally legal JS this just cased the problem for me while building with ncc: vercel/ncc#721
To Reproduce
Create a module with a foreign code above and bundle. (
purs bundle ./output/BadForeign/*.js -o bad-bundle.js)Expected behavior
Respect (at least not break in this strange way) the existing formatting of the foreign module code?
Additional context
PureScript version
0.14.2