Migrate CommonJS imports to ESM imports with extensions.
To use this package without installing it globally, you can use npx or pnpx:
npx migrate-esm-imports [options] [inputs...]
pnpx migrate-esm-imports [options] [inputs...]npx migrate-esm-imports src-x, --exclude <patterns...>: Directories or files to exclude (default:['.git', 'node_modules', 'dist'])-c, --concurrency <number>: Number of files to process concurrently (defaults to number of CPUs)-d, --dry-run: Perform a dry run without making any changes-v, --verbose: Enable verbose output-e, --extensions <exts...>: File extensions to process (default:['js', 'jsx', 'ts', 'tsx', 'cjs', 'mjs', 'cts', 'mts'])
Contributions are welcome! Please file an issue or open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.