Docs: add section to help those bundling via Vite

This commit is contained in:
idchlife 2024-02-06 19:54:24 +03:00 committed by Lovell Fuller
parent 26d0b7147d
commit fc439bedf1
2 changed files with 21 additions and 1 deletions

View File

@ -249,6 +249,26 @@ option.
} }
``` ```
### vite
Ensure `sharp` is excluded from bundling via the
[build.rollupOptions](https://vitejs.dev/config/build-options.html)
configuration.
```js
import { defineConfig } from 'vite';
export default defineConfig({
build: {
rollupOptions: {
external: [
"sharp"
]
}
}
});
```
## TypeScript ## TypeScript
TypeScript definitions are published as part of TypeScript definitions are published as part of

File diff suppressed because one or more lines are too long