Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
rollup-plugin-ts
A TypeScript Rollup plugin that bundles declarations, respects Browserslists, and enables seamless integration with transpilers such as babel and swc
Yargs ships a dual CJS/ESM module using a combination of TypeScript, Rollup, and modern Node.js features, here's how:
We added the type: module field to our package.json, to indicate that by default files with a .js extension should be considered to be ECMAScript modules (this is a workaround for the fact that TypeScript does not currently support the .mjs extension, and should be avoided if not using TypeScript, or once the issue is resolved).
Note the @wessberg/rollup-plugin-ts dependency, this handles the translation between TypeScript and CommonJS.