typescript-swc-starter
A simple node boilerplate made in typescript using swc which generates cjs
and esm
modules.
Clone repository and install dependencies
git clone https://github.com/maxgfr/typescript-swc-starter
cd typescript-swc-starter
yarn
:warning: You have to use at least node@20
to run this project.
Commands
yarn dev
yarn test
yarn test:watch
yarn lint
yarn lint:fix
yarn build
yarn type-check
yarn start:cjs
yarn start:esm
Publish to npm
Set NPM_TOKEN
in your Github actions secret, and that's it :)

To test this package, just do that :
import { sayHello } from 'typescript-swc-starter';
sayHello();