Multiple and aliased publicDirs
#16138
Labels
p3-downstream-blocker
Blocking the downstream ecosystem to work properly (priority)
publicDirs
#16138
Description
Currently, Vite supports a single
publicDir
. However, there are situations where we might want to merge multiple public directories. For example, in Nuxt we support an arbitrary number of public directories, each with a possible prefix (e.g./foo
points to/some/dir
)We can implement this within Nuxt itself (e.g. nuxt/nuxt#26163) but we obviously lose out on some of the cool features Vite has, like rendering relative URLs, and in general the entire asset pipeline.
Suggested solution
publicDir
could also accept an array of strings or objects of{ dir: string, prefix: string }
(to support alias).Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: