# @theorchard/frontend-vite

## 2.0.2

### Patch Changes

-   Fixed `vite preview` serving at the CDN path prefix instead of `/`. The `suite-app-defaults` plugin now only resolves the CDN base during `vite build`; both `vite dev` and `vite preview` always use `base: '/'`.
-   Fixed `build` config merging in `suite-app-defaults` plugin to use `mergeConfig` with `isRoot=false` as required for merging build-level configs per Vite docs.
-   Changed `resolveBuildConfig` to use `rolldownOptions` (Vite 8) instead of the deprecated `rollupOptions`.

## 2.0.1

### Patch Changes

-   Updated dependencies
    -   @theorchard/frontend-cli-core@3.1.0

## 2.0.0

### Major Changes

-   Added a new `suite-app-defaults` pre-plugin to `suiteApp()` that automatically applies Suite defaults for `base`, `build`, and `server.port`.
-   `suiteApp()` now merges plugin defaults with user Vite config using Vite `mergeConfig`, with user-provided values taking precedence.
-   Updated `resolveBuildConfig` typing to use `satisfies BuildOptions` while preserving runtime behavior.

**Breaking change**: projects relying on Vite’s implicit defaults (for example, not setting `base/build/server.port`) may now observe different runtime config unless those values are explicitly set.

## 1.0.4

### Patch Changes

-   SEC: lodash from 4.17.23 to 4.18.1
-   Updated dependencies
    -   @theorchard/frontend-cli-core@3.0.2

## 1.0.3

### Patch Changes

-   SEC: lodash-es from 4.17.23 to 4.18.1
-   Updated dependencies
    -   @theorchard/frontend-cli-core@3.0.1

## 1.0.2

### Patch Changes

-   Updated dependencies
    -   @theorchard/frontend-cli-core@3.0.0

## 1.0.1

### Patch Changes

-   Updated dependencies
    -   @theorchard/frontend-cli-core@2.1.1

## 1.0.0

### Major Changes

-   Initial release. Extracted from `frontend-cli-vite` as a standalone package that does not require the full frontend CLI toolchain.
-   `suiteApp()` — Vite plugin array that injects `window.FRONTEND_CONFIG` and renders the HTML through mustache with the resolved frontend config.
-   `resolveBase()` — Async helper that resolves the CDN-aware Vite `base` path.
-   `resolveBuildConfig()` — A helper that resolves the Vite `build` options including output directory, manifest, sourcemaps, and slug-based chunk naming.
