-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
feat: add es.min format for lib mode #6585
base: main
Are you sure you want to change the base?
Conversation
use fix #6555 to mentioned issues |
@abarke have fix the test. |
@@ -224,6 +224,16 @@ const rollupToEsbuildFormatMap: Record< | |||
export const buildEsbuildPlugin = (config: ResolvedConfig): Plugin => { | |||
return { | |||
name: 'vite:esbuild-transpile', | |||
outputOptions(opts) { | |||
// @ts-ignore inject by resolveLibFormat call | |||
if (opts.__vite_lib_minify__) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the __vite_lib_minify__
can save into config: ResolvedConfig
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResolvedConfig will include mutiple format,maybe both es
and es.min
.And save into config: ResolvedConfig
making this case not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Record<string, boolean>?
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Any movement here? |
it seems that |
Would be great to get this merged! |
@poyoho would it be possible to elaborate a bit on what changes would be needed to get this merged? It would really be useful to see this PR progressing, and I'm willing to help if needed. |
rebase? |
I need this, how can I help? |
Any updates? |
Is there a workaround before this PR get merged? I'm aware of some custom plugins mentioned in #6555. But it seems none of them can correctly combine sourcemaps? |
Description
resolve: #6555
Additional context
I found there seems no appropriate way for rollup to inject some meta data exposed to plugin.And my implementation might be inappropriate.
If you think the implementation is appropriate, I will add the test case.Otherwise i will change my implementation.
Thanks for you review!
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).