sindresorhus / ora

Elegant terminal spinner
MIT License
9.08k stars 269 forks source link

Cannot run inside transpiled cjs files #203

Closed cmbirk closed 2 years ago

cmbirk commented 2 years ago

I'm transpiling my typescript files into commonjs files. When attempting to use ora in the commonjs I get the error:

import process from 'node:process';
^^^^^^

SyntaxError: Cannot use import statement outside a module

Would you accept a PR that builds a cjs output as well?

sindresorhus commented 2 years ago

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

sindresorhus commented 2 years ago

I have no plans to support CommonJS. Use version 5 if you need CommonJS support.