We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const { ModuleKind, transpileModule } = require('typescript'); const { cjsToEsm } = require('@wessberg/cjs-to-esm-transformer'); const result = transpileModule( ` export const SomeLib = require('lib-2'); export const SomeLibVar = require('lib-2').someVar; `, { transformers: cjsToEsm(), compilerOptions: { module: ModuleKind.ESNext, target: ModuleKind.ESNext } } ); console.log(result.outputText);
import SomeLib from "lib-2"; export const SomeLibVar = SomeLib.someVar;
import SomeLib from "lib-2"; export { SomeLib }; export const SomeLibVar = SomeLib.someVar;
The text was updated successfully, but these errors were encountered:
31d0141
Hi there. Thanks for reporting this issue. It has been fixed in v0.0.22
Sorry, something went wrong.
No branches or pull requests
Example
Output
Expecting
The text was updated successfully, but these errors were encountered: