Skip to content

Commit 7ae0134

Browse files
chore: update versions (#248)
1 parent de515fa commit 7ae0134

4 files changed

Lines changed: 34 additions & 36 deletions

File tree

.changeset/eighty-mammals-search.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.changeset/heavy-candies-post.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# vite-plugin-static-copy
22

3+
## 4.0.1
4+
5+
### Patch Changes
6+
7+
- [#249](https://github.com/sapphi-red/vite-plugin-static-copy/pull/249) [`c6bf44c`](https://github.com/sapphi-red/vite-plugin-static-copy/commit/c6bf44cced74417aa2ff90a0bc2c3dcc2fbaf93a) Thanks [@sapphi-red](https://github.com/sapphi-red)! - Fix absolute `dest` paths being nested under the output directory
8+
9+
When `dest` was an absolute path and the source file had a directory component (structured output), the path was incorrectly converted to a relative path, causing files to be nested under the build output directory instead of being copied to the specified absolute path.
10+
11+
```js
12+
{ src: 'foo/foo.txt', dest: '/home/user/my-repo/bar' }
13+
```
14+
15+
**Before**: `/home/user/my-repo/dist/home/user/my-repo/bar/foo/foo.txt`
16+
**After**: `/home/user/my-repo/bar/foo/foo.txt`
17+
18+
- [#247](https://github.com/sapphi-red/vite-plugin-static-copy/pull/247) [`d3af79e`](https://github.com/sapphi-red/vite-plugin-static-copy/commit/d3af79e6bf3ac8ef9fd77b9f4c3ae9bfe427a16e) Thanks [@sapphi-red](https://github.com/sapphi-red)! - Fix `rename.stripBase` to work correctly with `../` paths
19+
20+
Previously, `stripBase` counted `..` as directory segments, causing incorrect output paths when copying from parent directories.
21+
22+
```js
23+
{ src: '../../src/pages/**/*.html', dest: 'dist/', rename: { stripBase: 2 } }
24+
```
25+
26+
**Before**: `dist/src/pages/events/test.html`
27+
**After**: `dist/events/test.html`
28+
29+
```js
30+
{ src: '../../src/pages/**/*.html', dest: 'dist/', rename: { stripBase: true } }
31+
```
32+
33+
**Before**: `dist/src/pages/events/test.html`
34+
**After**: `dist/test.html`
35+
336
## 4.0.0
437

538
### Major Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vite-plugin-static-copy",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "rollup-plugin-copy for vite with dev server support.",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)