# ViteAppResource.WithViteConfig

- Module: [Aspire.Hosting.JavaScript](/reference/api/go/aspire.hosting.javascript.md)
- Defined on: [ViteAppResource](/reference/api/go/aspire.hosting.javascript/viteappresource.md)
- Version: `17.0.0`
- Kind: `method`

Configures the Vite app to use the specified Vite configuration file instead of the default resolution behavior.

## Remarks

Use this method to specify a specific Vite configuration file if you need to override the default Vite configuration resolution behavior.

## Definition

```go
type ViteAppResource interface {
    // ... omitted for brevity
    WithViteConfig(configPath string) ViteAppResource
}
```

## Signature

```go
WithViteConfig(configPath string) ViteAppResource
```

## Parameters

- `configPath` (`string`) -- The path to the Vite configuration file. Relative to the Vite service project root.

## Returns

[`ViteAppResource`](/reference/api/go/aspire.hosting.javascript/viteappresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [ViteAppResource](/reference/api/go/aspire.hosting.javascript/viteappresource.md) -- `handle`
