---
title: "vite-plugin-static-copy 4.1.0 Breaking Changes on npm"
description: "What each vite-plugin-static-copy release removed, renamed or changed: 18 breaking changes in 8 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/vite-plugin-static-copy
last_updated: 2026-12-04
---

# vite-plugin-static-copy breaking changes

vite-plugin-static-copy 4.1.0 (April 19, 2026) is its newest release with breaking changes, 3 of them. The first: Removed RenameObject.stripBase. Every breaking API change we have recorded in vite-plugin-static-copy on npm: 18 breaking changes in 8 versions. Below, its 8 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `4.1.1`, released June 6, 2026. [Source repository](https://github.com/sapphi-red/vite-plugin-static-copy)

Its 4.0.0 release requires Node.js 22.0.0 or later. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [3.4.0](#v-3-4-0) to [4.1.0](#v-4-1-0): 12 breaking changes in 3 versions.
- From [3.0.0](#v-3-0-0) to [4.1.0](#v-4-1-0): 17 breaking changes in 7 versions.

## vite-plugin-static-copy 4.1.0 breaking changes

vite-plugin-static-copy 4.1.0, released April 19, 2026: 3 breaking changes.

- **Removed** `RenameObject.stripBase`  

RenameObject.stripBase was removed in vite-plugin-static-copy 4.1.0 [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/4.1.0)
- **Signature changed** `RenameFunc`  

Was type RenameFunc = (fileName: string, fileExtension: string, fullPath: string) => MaybePromise\<string>; now type RenameFunc = (fileName: string, fileExtension: string, fullPath: string) => MaybePromise\<string | RenameObject>. [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/4.1.0)
- **Signature changed** `RenameObject`  

Was type RenameObject = {stripBase: number | true;}; now type RenameObject = WithRequiredSingleKey\<OptionalRenameObject, 'stripBase'> | WithRequiredSingleKey\<OptionalRenameObject, 'name'>. [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/4.1.0)

## vite-plugin-static-copy 4.0.1 breaking changes

vite-plugin-static-copy 4.0.1, released April 4, 2026: 2 breaking changes.

- **Behavior changed** `dest`  

With an absolute dest and a source file that has a directory component, files now copy to the specified absolute path instead of under the build output directory. Code relying on the old nested output must be updated. [github.com](https://github.com/sapphi-red/vite-plugin-static-copy/releases/tag/vite-plugin-static-copy%404.0.1)
- **Behavior changed** `rename.stripBase`  

Previously stripBase counted '..' as directory segments, so output paths for parent-directory sources differ now. Code relying on the old output paths must be updated. [github.com](https://github.com/sapphi-red/vite-plugin-static-copy/releases/tag/vite-plugin-static-copy%404.0.1)

## vite-plugin-static-copy 4.0.0 breaking changes

vite-plugin-static-copy 4.0.0, released March 22, 2026: 7 breaking changes.

- **Removed**  

Vite 5 is no longer supported; users must run Vite 6 or later. [github.com](https://github.com/sapphi-red/vite-plugin-static-copy/releases/tag/vite-plugin-static-copy%404.0.0)
- **Removed**  

The supported Node.js range is now ^22.0.0 or >= 24.0.0, so users on older Node versions must upgrade. [github.com](https://github.com/sapphi-red/vite-plugin-static-copy/releases/tag/vite-plugin-static-copy%404.0.0)
- **Removed** `ViteStaticCopyOptions.structured`  

Directory structure is now always preserved in the output. To flatten output paths, use rename with stripBase set to true. [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/4.0.0)
- **Behavior changed**  

Glob patterns no longer match directory entries; only files are matched and copied. Directory patterns are auto-expanded to their files. [github.com](https://github.com/sapphi-red/vite-plugin-static-copy/releases/tag/vite-plugin-static-copy%404.0.0)
- **Signature changed** `RenameObject`  

Was type RenameObject = {stripBase: number;}; now type RenameObject = {stripBase: number | true;}. [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/4.0.0)
- **Signature changed** `RenameObject.stripBase`  

Was stripBase: number; now stripBase: number | true. [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/4.0.0)
- **Signature changed** `ViteStaticCopyOptions`  

Was type ViteStaticCopyOptions = {targets: Target\[\]; structured?: boolean; silent?: boolean; watch?: {options?: WatchOptions; reloadPageOnChange?: boolean;}; hook?: string; environment?: string;}; now type ViteStaticCopyOptions = {targets... [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/4.0.0)

## vite-plugin-static-copy 3.4.0 breaking changes

vite-plugin-static-copy 3.4.0, released March 22, 2026: 2 breaking changes.

- **Signature changed** `Target`  

Was type Target = {src: string | string\[\]; dest: string; rename?: string | RenameFunc; transform?: TransformOption; preserveTimestamps?: boolean; dereference?: boolean; overwrite?: boolean | 'error';}; now type Target = {src: string |... [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/3.4.0)
- **Signature changed** `Target.rename`  

Was rename?: string | RenameFunc; now rename?: string | RenameObject | RenameFunc. [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/3.4.0)

## vite-plugin-static-copy 3.2.0 breaking changes

vite-plugin-static-copy 3.2.0, released January 27, 2026: 1 breaking change.

- **Signature changed** `ViteStaticCopyOptions`  

Was type ViteStaticCopyOptions = {targets: Target\[\]; structured?: boolean; silent?: boolean; watch?: {options?: WatchOptions; reloadPageOnChange?: boolean;}; hook?: string;}; now type ViteStaticCopyOptions = {targets: Target\[\]... [npmjs.com](https://www.npmjs.com/package/vite-plugin-static-copy/v/3.2.0)

## vite-plugin-static-copy 3.1.5 breaking changes

vite-plugin-static-copy 3.1.5, released January 19, 2026: 1 breaking change.

- **Behavior changed**  

The plugin now copies files only for the client environment, so other environments such as SSR no longer receive copies. Check that your build still gets the files it needs. [github.com](https://github.com/sapphi-red/vite-plugin-static-copy/releases/tag/vite-plugin-static-copy%403.1.5)

## Older versions

2 older versions.

### vite-plugin-static-copy 3.1.2 breaking changes

vite-plugin-static-copy 3.1.2, released August 21, 2025: 1 breaking change.

- **Behavior changed**  

Files not included in src could previously be requested with a crafted request; that access is now blocked. Check that your setup does not rely on serving those files. [github.com](https://github.com/sapphi-red/vite-plugin-static-copy/releases/tag/vite-plugin-static-copy%403.1.2)

### vite-plugin-static-copy 3.0.0 breaking changes

vite-plugin-static-copy 3.0.0, released May 10, 2025: 1 breaking change.

- **Behavior changed**  

Globs now use tinyglobby, so range braces like {01..03} and incremental braces like {2..8..2} are no longer supported. Rewrite such patterns as explicit lists, such as {01,02,03}. [github.com](https://github.com/sapphi-red/vite-plugin-static-copy/releases/tag/vite-plugin-static-copy%403.0.0)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
