New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full control of build filename in library mode #3585
Labels
enhancement
New feature or request
Comments
We've discussed this issue in a team meeting before. Instead of adding a new option, I think letting |
gobeli
added a commit
to gobeli/vite
that referenced
this issue
Jun 1, 2021
9 tasks
gobeli
added a commit
to gobeli/vite
that referenced
this issue
Jun 2, 2021
gobeli
added a commit
to gobeli/vite
that referenced
this issue
Jun 14, 2021
gobeli
added a commit
to gobeli/vite
that referenced
this issue
Jun 29, 2021
aleclarson
pushed a commit
to aleclarson/vite
that referenced
this issue
Nov 8, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Clear and concise description of the problem
vite/packages/vite/src/node/build.ts
Line 417 in 4afb743
Currently vite always append
.es.js
in the end of filename in library mode, but there should be a way to let users fully control the filenames.Suggested solution
Add another options in LibraryOptions like
fullyControlledFileName
:fullyControlledFileName
should have higher priority thanfileName
, so iffullyControlledFileName
is not undefined, vite should ignore thefileName
option.Alternative
Another way is changing the current behavior of the option
fileName
to make user fully control how the file name is generated, but this would be a breaking change to those who relay on the current file naming strategy.The text was updated successfully, but these errors were encountered: