Skip to content
Back to skills

Vite Knowledge Patch

ASecurity

Vite

  • 25 stars
  • 0 votes
  • 0 copies
  • 13 views
  • Added September 5, 2026
developmentjavascripttypescriptjavareactdebuggingapi

Works with

  • terminal
  • cli
  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill vite-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vite Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Vite Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-vite-knowledge-patch-nevaberry-plugins/badge)](https://www.skillsdirectory.com/skills/nevaberry-vite-knowledge-patch-nevaberry-plugins)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: vite-knowledge-patch
description: Vite
version: "8.4.0"
license: MIT
metadata:
  author: Nevaberry
---


# Vite Knowledge Patch

Load this skill when migrating Vite configuration, updating plugins or framework
integrations, or working on builds, dependency optimization, development servers,
module resolution, workers, assets, and styles.
Use the topic references for complete guidance and release-specific attribution.

## Topic index

| Reference | Topics |
| --- | --- |
| [Migration and runtime requirements](references/migration-requirements.md) | Removed options, deprecations, bundler migration, browser targets, React, Vitest, scaffolding |
| [Builds and dependency optimization](references/build-optimization.md) | Build inputs, manifests, asset emission, experimental chunk import maps, optimizer configuration, caches, interop |
| [Development server, globs, and assets](references/dev-server-assets.md) | Filesystem access, origins, proxying, WebSockets, URLs, Devtools, profiling, bundled development, HMR, HTML, workers |
| [Plugin and framework APIs](references/plugin-api.md) | Experimental environments, coordinated builds, module runners, plugin hooks, logging, resolution, types |
| [Resolution and module interoperability](references/resolution-modules.md) | Built-ins, externalization, aliases, config loading, module metadata, WebAssembly |
| [Transforms, TypeScript, and styles](references/transforms-styles.md) | CSS and SSR, Sass, Lightning CSS, scoping, CSS output, decorator metadata, define diagnostics |

## Breaking changes and deprecations

### Removed settings and renamed APIs

- Remove `server.fs.cachedChecks` when upgrading to Vite 6.
- `optimizeDeps.rollupOptions` has been removed. Move dependency optimizer
  bundler settings to `optimizeDeps.rolldownOptions`.
- Vite 8 deprecates `customResolver` on `resolve.alias` entries. Use a plugin
  with `enforce: 'pre'` and a `resolveId` hook for custom resolution.
- Vite 7 deprecates `ResolvedConfig.createResolver`. Use `createIdResolver`
  for environment-aware ID resolution.
- Use `HotUpdateOptions` for the environment-aware `hotUpdate` hook;
  update imports that still use `HotUpdateContext`.
- Vite removed `keepProcessEnv` from the `DefaultEnvironmentOptions` type.
- Move `css.devSourcemap` to `dev.sourcemap.css` for development CSS source maps.

### Configuration and optimizer commands

The standalone `vite optimize` command is deprecated. Use `vite --force` to
start the dev server and re-run dependency optimization in all environments
where it is enabled.

The `--configLoader` CLI option is stable; its `runner` value is deprecated.
Vite warns when the deprecated `envFile` option is set.
Set `envDir: false` to skip loading `.env` files.

### Migration warnings

Set `future: 'warn'` to enable all available migration warnings, including
`server.pluginContainer`, `server.reloadModule`, `server.warmupRequest`,
`server.hot`, and the SSR argument in plugin hooks. The `removeSsrLoadModule`
warning also covers `server.ssrFixStacktrace` and `server.ssrRewriteStacktrace`.

```ts
export default {
  future: 'warn',
}
```

### Bundler and transform migration

Vite 8 translates existing `esbuild` and `rollupOptions` settings to their
Oxc and Rolldown equivalents. To isolate bundler compatibility issues before
upgrading Vite, try `rolldown-vite` on Vite 7 first.

Starting in 8.1.1, Vite inverts `esbuild.jsxSideEffects` when translating it to
`oxc.jsx.pure`: `esbuild.jsxSideEffects: true` maps to `oxc.jsx.pure: false`.

Vite 7 changes the default `build.target` from `'modules'` to
`'baseline-widely-available'`, targeting Chrome 107, Edge 107, Firefox 104,
and Safari 16.0. These minimum versions are refreshed with each major release
to match Baseline Widely Available.

### Stylesheet migration

Vite 7 removes Sass's legacy API and defaults `css.preprocessorMaxWorkers`
to `true`. Remove `css.preprocessorOptions.sass.api: 'legacy'` or
`css.preprocessorOptions.scss.api: 'legacy'` to use the compiler API.

Vite 6 removes the default export of plain stylesheets in SSR development.
Use `import css from './style.css?inline'` when a server module needs CSS text.
Vite now keeps CSS imports in its processing pipeline by default in SSR.

Vite 8.4.0 skips empty CSS files, so allow a stylesheet file to be absent.
The styles reference describes the different 7.1.0 release note; check
behavior on intermediate versions.

### Hot updates and WebSocket settings

Vite 8 removes the dependency-resolution fallback for `import.meta.hot.accept()`.
Use the same specifier in the import and accept call, such as
`import './dep.js'` with `import.meta.hot.accept('./dep.js', callback)`.

Starting in 8.1.0-beta.0, configure the dev-server WebSocket under `server.ws`;
for example, move `server.hmr.clientPort` to `server.ws.clientPort`.

## Common configuration and development features

### TypeScript aliases and metadata

Set `resolve.tsconfigPaths: true` to resolve aliases from `tsconfig.json`
`paths`; this is off by default. Starting in 8.1.1, this also enables path
alias resolution for CSS and Sass `@import` statements.

Vite automatically honors `emitDecoratorMetadata` in `tsconfig.json`, so
projects can remove plugins used solely to emit decorator metadata.

### Devtools, logs, and ports

Use the `devtools` option to enable Vite Devtools for debugging and analysis
through the dev server. The integrated Devtools require `@vitejs/devtools`
0.1 or later; upgrade an older package. Vite 8.2.2 accepts 0.5.0 in its peer range.

Set `server.forwardConsole: true` to see browser console logs and errors in
the dev server terminal. Forwarding is also enabled automatically when Vite
detects a coding agent.

Run `vite --debug` for environment-loading diagnostics. Starting in 8.2.1,
set `server.port: 0`, or run `vite --port 0`, to let the OS choose a free port.

### Filesystem access

Set `server.fs.strict: 'extended'` to register additional safe module
references, including references in HTML. Safe module paths are tracked per
environment; plugins can register them through `environment.addSafeModule`.

Starting in 8.2.0, configured build inputs are added to `server.fs.allow`.
The default `server.fs.deny` list blocks more common files from being served.

### Experimental bundled development

Enable browser-side bundling during development with
`vite --experimental-bundle` or `experimental.bundledDev: true`.
Third-party plugins may require changes to work in this mode.
Experimental bundled development also supports SSR environments when enabled.

```js
export default {
  experimental: { bundledDev: true },
}
```

### Experimental chunk import maps

Set `build.chunkImportMap` to keep chunk import specifiers stable when imported
chunks change. This experimental option is incompatible with
`experimental.renderBuiltUrl`. Starting in 8.2.1, client builds support it
with `sharedPlugins: true`.

### Globs and HTML assets

Pass `caseSensitive: false` to `import.meta.glob` to match filenames
regardless of case, including during hot updates.

Use `html.additionalAssetSources` for additional HTML attributes containing
asset URLs. Keys are element names; `srcAttributes` lists attributes to
process. A single attribute may be supplied as a string.

## Builds, styles, and runtime integrations

### Manifest consumers

With `build.manifest` enabled, the manifest includes worker chunks.
The `imports` field in `manifest.json` lists only JavaScript chunks.
Standalone CSS entry records include an `assets` field for referenced assets.

With `build.cssCodeSplit: false`, look up the combined stylesheet under
`'style.css'` and read that record's `file` field for the emitted URL path.
Build integrations can read the manifest directly from the build environment.

### Dependency optimization

Vite supports discovery and pre-bundling in SSR environments. An include can
target a nested dependency, such as
`environments.ssr.optimizeDeps.include: ['parent-dep > nested-dep']`.

The optimizer honors the top-level `tsconfig` option during dependency
scanning and bundling. Editing a dependency patch in place invalidates cached
pre-bundled dependencies even when the lockfile stays the same.

Starting in 7.3.1, set `optimizeDeps.ignoreOutdatedRequests: true` to ignore
outdated requests for optimized dependencies during development.

### Lightning CSS

Vite 8 installs `lightningcss` as a regular dependency, so CSS minification
with Lightning CSS works out of the box. CSS preprocessors work with
`css.transformer: 'lightningcss'`; stylesheets can import external CSS files,
and plugins can register file dependencies with that transformer.

Starting in 8.2.1, Vite skips the configured Lightning CSS visitor during
minification so its transformations are applied only once.

### Environment and module runner APIs

Framework authors can use the experimental Environment API to make development
environments more closely match production runtimes. Adoption is optional for
existing custom SSR apps. The fetchable environment interface is experimental,
as is the `buildApp` hook for coordinating builds across environments.

Use `createRunnableDevEnvironment` to give a custom environment a module runner.
Configure the factory under the named environment's `dev.createEnvironment`;
the top-level factory setting applies to the client.
Use `await runner.close()` to dispose of a module runner.

### WebAssembly

SSR modules can initialize WebAssembly through `.wasm?init`.
Named exports can be imported directly from a `.wasm` file and called from
JavaScript. Use `import source` with a `.wasm` file to obtain a
`WebAssembly.Module` that you can instantiate yourself.

Files in this skill

  • SKILL.md6.5 KB
  • coverage.json737 B
  • references/build-optimization.md2.5 KB
  • references/dev-server-assets.md1.9 KB
  • references/migration-requirements.md2 KB
  • references/plugin-api.md1.1 KB
  • references/resolution-modules.md965 B
  • references/transforms-styles.md952 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.