Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JLarky
Copy link

@JLarky JLarky commented Oct 27, 2024

This PR allows you to tweak solid options, like using hydratable option.

image

@@ -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'
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only "solid" field?

Comment on lines -250 to +269
solidPlugin({ solid: { generate: type.server ? 'ssr' : 'dom' } }),
solidPlugin({
solid: {
generate: type.server ? 'ssr' : 'dom',
...type.solid_options,
},
}),
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants