Skip to content
/ esm-ts Public

Use ESM modules in TypeScript without any configuration

License

Notifications You must be signed in to change notification settings

nooqta/esm-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esm-ts

Version

Import ESM modules into your typescript without messing your configuration.

If you are importing an ESM module within a typescript project and receiving the following error then this package might save you some headaches. Don't forget to star ;)

Error [ERR_REQUIRE_ESM]: require() of ES Module

Install

npm install esm-ts

Usage

Install the ESM module you want to use. Then import it using the following function

import { requiresm } from 'ts-esm'
// specify the module you want to import
const ora = await requiresm('ora');
ora.start();

Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2022 Anis Marrouchi.

This project is MIT licensed.


This README was generated with ❤️ by readme-kodyfire

About

Use ESM modules in TypeScript without any configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published