Exclude OS files when copying the `static` directory
Open
Nobody has claimed this yet.
vite
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the bug
These files included in the default .gitignore are copied on vite build command.
# OS
.DS_Store
Thumbs.db
Maybe they can be excluded by the adapters? (e.g. adapter-node)
Reproduction
pnpm dlx sv create .
ls -a static
# .
# ..
# favicon.png
touch static/.DS_Store
ls -a static
# .
# ..
# .DS_Store -- added
# favicon.png
pnpm build
ls -a .svelte-kit/output/client
# .
# ..
# .DS_Store -- copied
# .vite
# _app
# favicon.png
Same for adapter-node generated build:
ls -a build/client
# .
# ..
# .DS_Store
# _app
# favicon.png
Logs
System Info
System:
OS: macOS 15.3.1
CPU: (10) arm64 Apple M1 Pro
Memory: 77.36 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.14.0 - ~/.local/state/fnm_multishells/66551_1741704413922/bin/node
Yarn: 1.22.22 - ~/.local/state/fnm_multishells/66551_1741704413922/bin/yarn
npm: 10.9.2 - ~/.local/state/fnm_multishells/66551_1741704413922/bin/npm
pnpm: 10.6.1 - ~/.local/state/fnm_multishells/66551_1741704413922/bin/pnpm
Browsers:
Chrome: 134.0.6998.44
Edge: 134.0.3124.51
Safari: 18.3
npmPackages:
@sveltejs/adapter-auto: ^4.0.0 => 4.0.0
@sveltejs/adapter-node: ^5.2.12 => 5.2.12
@sveltejs/kit: ^2.16.0 => 2.19.0
@sveltejs/vite-plugin-svelte: ^5.0.0 => 5.0.3
svelte: ^5.0.0 => 5.22.6
vite: ^6.0.0 => 6.2.1
Severity
annoyance
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the static directory copy performed during the pnpm build command and compare the .svelte-kit/output/client and adapter-node build/client outputs shown in the reproduction. Trace whether the copy path belongs to SvelteKit or adapter-node; done means .DS_Store and Thumbs.db are absent from both generated outputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, vite
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100