Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
glitch-txs authored Apr 22, 2024
1 parent f9e983b commit fe6fd09
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,24 @@ _`--externals` should always be the **last** flag in the script._

To support different frameworks with Vite plugins add the `--react` or `--vue` flag in the script.

### Run the script

```sh
pnpm run size
"size": "npx tsc && vite-size --react --externals react react-dom"
```

## Lib mode
### Lib mode

Use `--lib` if you're not using an `index.html` file.

```sh
"size": "npx tsc && vite-size --lib --externals <package-name> <another-package-name>"
```

### Run the script

```sh
pnpm run size
```

## GitHub Action

Use with [GitHub Actions](https://github.com/glitch-txs/vite-size-action).

0 comments on commit fe6fd09

Please sign in to comment.