Legacy library code that has contains export = syntax #11649
-
I'm working on a large codebase that has existing modules containing the following syntax:
In the following link: https://babeljs.io/docs/en/babel-plugin-transform-typescript#caveats, there explicitly says there is no workaround for the Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, you have to write a custom transform. Maybe you could try copy-pasting https://github.com/facebook/jest/blob/a0834f83ac7c0841b2d5782f2f8f9b2f6672e324/scripts/babel-plugin-jest-replace-ts-export-assignment.js and see if it works for you. |
Beta Was this translation helpful? Give feedback.
Yes, you have to write a custom transform.
Maybe you could try copy-pasting https://github.com/facebook/jest/blob/a0834f83ac7c0841b2d5782f2f8f9b2f6672e324/scripts/babel-plugin-jest-replace-ts-export-assignment.js and see if it works for you.