You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to build two products (a client and a server) from the same project. To this end I have two Vite config files with (among others) different entry points. I want to use the public directory to copy over certain files to the client's root directory, but also to copy certain files to the server's root directory. Currently however there is no way to tell Vite to use a different 'public' directory for each build. Judging by the source code, the "public" path seems to be hardcoded:
Allow the "public" directory to be changed from the vite.config.js file. Suggestion:
"publicDir": "name of directory (public by default)"
Describe alternatives you've considered
Instructions on building both server and client with Vite are limited. I might be misusing Vite for this purpose, but I do like to use the same build system for both, so you just have to learn one system. I could use rollup directly for the server build of course.
Additional context
n/a
Very happy with Vite so far!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I want to build two products (a client and a server) from the same project. To this end I have two Vite config files with (among others) different entry points. I want to use the
public
directory to copy over certain files to the client's root directory, but also to copy certain files to the server's root directory. Currently however there is no way to tell Vite to use a different 'public' directory for each build. Judging by the source code, the "public" path seems to be hardcoded:vite/packages/vite/src/node/build.ts
Line 310 in c2e8806
Describe the solution you'd like
Allow the "public" directory to be changed from the vite.config.js file. Suggestion:
Describe alternatives you've considered
Instructions on building both server and client with Vite are limited. I might be misusing Vite for this purpose, but I do like to use the same build system for both, so you just have to learn one system. I could use rollup directly for the server build of course.
Additional context
n/a
Very happy with Vite so far!
The text was updated successfully, but these errors were encountered: