Skip to content

Instantly share code, notes, and snippets.

@fersilva16
Created February 7, 2022 15:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fersilva16/0ab10d59310b539520d3603b39b4229a to your computer and use it in GitHub Desktop.
Save fersilva16/0ab10d59310b539520d3603b39b4229a to your computer and use it in GitHub Desktop.
Run a TypeScript project using ESBuild and TSUP
{
"scripts": {
"build": "tsup",
"dev": "yarn build --onSuccess \"yarn start\"",
"dev:watch": "yarn dev --watch",
"start": "node dist/index.js",
},
"devDependencies": {
"tsup": "^5.11.13",
"typescript": "4.5.5"
}
}
{
"sourcemap": true,
"entryPoints": ["src/index.ts"],
"outDir": "dist",
"format": ["cjs"],
"target": "node16",
"bundle": true,
"skipNodeModulesBundle": true,
"clean": true,
"splitting": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment