Files
payload/docs/admin/vite.mdx
2023-10-08 14:31:40 -04:00

23 lines
869 B
Plaintext

---
title: Vite
label: Vite
order: 90
desc: NEEDS TO BE WRITTEN
---
Payload has a Vite bundler that you can install and bundle the Admin Panel with. This is an alternative to the [Webpack](/docs/admin/webpack) bundler.
To use Vite as your bundler, first you must install the package:
```bash
yarn add @payloadcms/bundler-vite
```
TODO:
- Give banner "warning" that this is in beta
- Talk about how you should see performance improvements in both build times and HMR
- Initial load might not be substantially faster, because Vite pre-bundles dependencies
- Talk about the new `admin.vite` property
- Talk about how for compatibility, the Vite config still automatically adds aliases that come in from the `admin.webpack` property
- Aliases work differently in Vite vs. Webpack (you can't pass Vite an absolute path to your alias source, it needs to match perfectly)