mirror of
https://github.com/Turfjs/turf.git
synced 2025-12-08 20:26:16 +00:00
* Upgrade rollup to fix @turf/turf build issue * prettier issues * Fix broken test Co-authored-by: Matt Fedderly <mfedderly@palantir.com>
13 lines
342 B
JavaScript
13 lines
342 B
JavaScript
// https://github.com/Turfjs/turf/pull/986
|
|
export default function typescriptExport() {
|
|
return {
|
|
name: "typescript-export",
|
|
renderChunk(code) {
|
|
code = code.trim();
|
|
const name = code.match(/module.exports = ([\w$]+);/);
|
|
if (name) code += `\nmodule.exports.default = ${name[1]};\n`;
|
|
return code;
|
|
},
|
|
};
|
|
}
|