Support multiple static asset dirs by allowing string arrays for `config.kit.files.assets`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the problem
I'd like to get static assets from multiple locations. In this example the SvelteKit site is inside the site/ directory as part of a bigger project and I'd like to use static assets from assets/ and site/static/.
.
├── assets
│ ├── ...
└── site
├── src
├── static
└── ...
Describe the proposed solution
config.kit.files.assets could support arrays:
// svelte.config.jg
export default {
kit: {
adapter: adapter(),
files: {
assets:[ `../assets`, `./static` ],
},
},
}
This currently raises
config.kit.files.assets should be a string, if specified
Alternatives considered
Create an alias of assets/ in site/static/. It works but feels hacky.
Importance
nice to have
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 config.kit.files.assets validation and the static asset handling described in the issue. Check the existing configuration and asset-related tests, then verify that multiple asset directories are accepted and served without breaking the current single-directory behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100