Skip to content

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