Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide terserOptions to schema store and inform upon $schema property usage #846

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 10 additions & 11 deletions docs/README.md
Expand Up @@ -154,6 +154,15 @@ Provide the following configuration in your `.vscode/settings.json` (or global)
}
```

Alternatively, you can provide the schema store via a `$schema` property.

```json
{
"$schema": "https://cdn.jsdelivr.net/npm/tsup/schema.json"
}
```

> INFO: The `$schema` property will only work when applied within `tsup.config.json` files.

### Multiple entrypoints

Expand Down Expand Up @@ -344,7 +353,7 @@ tsup src/index.ts --env.NODE_ENV production

### Building CLI app

When an entry file like `src/cli.ts` contains hashbang like `#!/bin/env node` tsup will automatically make the output file executable, so you don't have to run `chmod +x dist/cli.js`.
When an entry file like `src/cli.ts` contains hashbang like `#!/bin/env node` tsup will automatically make the outout file executable, so you don't have to run `chmod +x dist/cli.js`.

### Watch mode

Expand Down Expand Up @@ -409,16 +418,6 @@ You can also minify the output, resulting into lower bundle sizes by using the `
tsup src/index.ts --minify
```

To use [Terser](https://github.com/terser/terser) instead of esbuild for minification, pass terser as argument value

```bash
tsup src/index.ts --minify terser
```

> NOTE: You must have terser installed. Install it with `npm install -D terser`

In `tsup.config.js`, you can pass `terserOptions` which will be passed to `terser.minify` as it is.

### Custom loader

Esbuild loader list:
Expand Down