-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
Is your feature request related to a problem? Please describe.
I'm building a library and I want to generate output similar to what popular libraries like React and Vue do: esm + cjs/umd builds for both dev and prod modes, with only prod builds being minified and having source maps.
Right now, library mode generates esm and umd for prod mode by default and I can enable sourcemaps with a single line in the vite config file.
Describe the solution you'd like
Would be nice to have a builtin option (possibly enabled by default) to also generate dev builds which are not minified and include conditional code that uses import.meta.env.DEV
(as mentioned here).
Describe alternatives you've considered
It should be possible to achieve this using rollupOptions
with custom input/output but I think this is a necessary feature for library authors.