sindresorhus / transliterate

Convert Unicode characters to Latin characters using transliteration
MIT License
286 stars 20 forks source link

Support CommonJS and UMD modules #24

Closed szuperaz closed 2 years ago

szuperaz commented 2 years ago

We use transliterate in our SDK (stream-chat-react) and received some customer feedback that they are unable to use our SDK in a NextJS environment because this library doesn't support CommonJS modules.

I added a really minimal build workflow using microbundle.

sindresorhus commented 2 years ago

I have no plans to support CommonJS.

I suggest either staying on a pre-ESM version, do the bundling yourself, or copy-paste the code into your project for now.

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

riyadshauk commented 2 years ago

Yeah, this doesn't play when transpiling TypeScript to JavaScript to be bundled with Webpack, as I'm doing, using Serverless Framework for a back-end service. None of the other libraries I use have had this problem or have required me to change my configurations.

@sindresorhus It would be nice if CommonJS modules could be supported.