这是indexloc提供的服务,不要输入任何密码
Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
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
Loading