Skip to content

Commit

Permalink
Add Buy Me A Coffee banner to README
Browse files Browse the repository at this point in the history
  • Loading branch information
szymmis committed Mar 28, 2024
1 parent cff72da commit e473926
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
[![bundle-size](https://img.shields.io/bundlephobia/minzip/vite-express)](https://www.npmjs.org/package/vite-express)
[![license](https://img.shields.io/npm/l/vite-express?color=purple)](https://www.npmjs.org/package/vite-express)

> If you like `vite-express` make sure to leave **a ⭐ star**!\
> To support my work even futher you can also:\
> [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/szymmis)
- [📦 Installation \& usage](#-installation--usage)
- [🚚 Shipping to production](#-shipping-to-production)
- [📖 Multipage Apps](#-multipage-apps)
Expand Down Expand Up @@ -310,13 +314,13 @@ ViteExpress.config({ /*...*/ });
#### 🔧 Available options
| name | description | default | valid values |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ----------------------------------------------------------------- |
| mode | When set to development Vite Dev Server will be utilized, in production app will serve static files built with `vite build` command | `"development"` | `"development"` \| `"production"` |
| transformer | A function used to transform HTML served to the client, useful when you want to inject some metadata on the server. First argument is the HTML that is about to be sent to the client, second is the [`Request`][express-request] object. Needs to return transformed HTML as a string, or a Promise that resolves to the transformed HTML string. | `undefined` | `undefined` \| `(html: string, req: Request) => string \| Promise<string>` |
| ignorePaths | A regex or function used to determine if matched path/request should be ignored by Vite index.html serving logic. When defined as a function, the request will be ignored when function returns true. Example of usage: Can be used to disable Vite on `/api` paths. | `undefined` | `undefined` \| `RegExp` \| `(path: string, req: Request) => bool` |
| viteConfigFile | The path of the Vite config file. When not specified, it is assumed that the config file is in the current working directory. | `undefined` | `undefined` \| `string` |
| inlineViteConfig | When set to non-undefined value, `vite-express` will be run in [`viteless mode`](#-viteless-mode) | `undefined` | `undefined` \| `ViteConfig` |
| name | description | default | valid values |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------- |
| mode | When set to development Vite Dev Server will be utilized, in production app will serve static files built with `vite build` command | `"development"` | `"development"` \| `"production"` |
| transformer | A function used to transform HTML served to the client, useful when you want to inject some metadata on the server. First argument is the HTML that is about to be sent to the client, second is the [`Request`][express-request] object. Needs to return transformed HTML as a string, or a Promise that resolves to the transformed HTML string. | `undefined` | `undefined` \| `(html: string, req: Request) => string \| Promise<string>` |
| ignorePaths | A regex or function used to determine if matched path/request should be ignored by Vite index.html serving logic. When defined as a function, the request will be ignored when function returns true. Example of usage: Can be used to disable Vite on `/api` paths. | `undefined` | `undefined` \| `RegExp` \| `(path: string, req: Request) => bool` |
| viteConfigFile | The path of the Vite config file. When not specified, it is assumed that the config file is in the current working directory. | `undefined` | `undefined` \| `string` |
| inlineViteConfig | When set to non-undefined value, `vite-express` will be run in [`viteless mode`](#-viteless-mode) | `undefined` | `undefined` \| `ViteConfig` |
```typescript
type ViteConfig = {
Expand Down

0 comments on commit e473926

Please sign in to comment.