Replies: 2 comments
-
What do you think @antfu ? Feedback most appreciated 😃 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Created Issue #6954 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to know what
build.lib.format
is at build timeUse case: usage information (we log which build our clients are using at runtime).
This would also be useful for anyone who would like to change some values for different builds e.g.
es
,cjs
andesm
.Current workaround: Assuming I define
process.env.VITE_LIB_TYPE=umd
invite.config.js
I can useimport.meta.env
in the code and at build it will be replaced.However this solution means I need to have two
vite.config.js
files. One for each build format e.g. es and umd. Or is there a way to define an array of configs?Ideally there should be an environment variable set in
import.meta.env
for the build format e.g.This way I only need one configuration and I think this is a much more elegant solution.
Beta Was this translation helpful? Give feedback.
All reactions