-
Notifications
You must be signed in to change notification settings - Fork 3
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
add solid_options for solid babel plugin options #13
base: main
Are you sure you want to change the base?
Conversation
@@ -1,7 +1,7 @@ | |||
import path from 'path' | |||
import * as tsup from 'tsup' | |||
import * as esbuild from 'esbuild' | |||
import { solidPlugin } from 'esbuild-plugin-solid' | |||
import { type Options, solidPlugin } from 'esbuild-plugin-solid' |
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.
Please alias Options or the while import as solid so it's obvious what Options is.
* | ||
* @default {} | ||
*/ | ||
solid_options?: Options['solid'] | undefined |
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.
Why only "solid"
field?
solidPlugin({ solid: { generate: type.server ? 'ssr' : 'dom' } }), | ||
solidPlugin({ | ||
solid: { | ||
generate: type.server ? 'ssr' : 'dom', | ||
...type.solid_options, | ||
}, | ||
}), |
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.
imo this should be added to preset, not entry, options as (type: EntryType) => SolidPluginOptions
. And without merging with the default one. Either user provides options or we.
This PR allows you to tweak solid options, like using
hydratable
option.