web/versioned_docs/version-0.17/project/custom-vite-config.md
import { ShowForTs, ShowForJs } from '@site/src/components/TsJsHelpers'
Wasp uses Vite to serve the client during development and bundling it for production. If you want to customize the Vite config, you can do that by editing the vite.config.{js,ts} file in your project root directory.
Wasp will use your config and merge it with the default Wasp's Vite config.
Vite config customization can be useful for things like:
Be careful with making changes to the Vite config, as it can break the Wasp's client build process. Check out the default Vite config here to see what you can change.
Below are some examples of how you can customize the Vite config.
If you want to stop Vite from opening the browser automatically when you run wasp start, you can do that by customizing the open option.
export default defineConfig({
server: {
open: false,
},
})
```
You have access to all of the Vite dev server options in your custom Vite config. You can change the dev server port by setting the port option.
```env title=".env.server"
WASP_WEB_CLIENT_URL=http://localhost:4000
```
export default defineConfig({
server: {
port: 4000,
},
})
```
```env title=".env.server"
WASP_WEB_CLIENT_URL=http://localhost:4000
```
:::warning Changing the dev server port
⚠️ Be careful when changing the dev server port, you'll need to update the WASP_WEB_CLIENT_URL env var in your .env.server file.
:::
If you, for example, want to serve the client from a different path than /, you can do that by customizing the base option.
export default defineConfig({
base: '/my-app/',
})
```