esbuildsolid

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package esbuildsolid provides the esbuild plugins for building a Solid application entirely in Go.

result := api.Build(api.BuildOptions{
    EntryPoints: []string{entry},
    Bundle:      true,
    Plugins: []api.Plugin{
        esbuildsolid.Transform(solid.Options{}),
        esbuildsolid.Runtime(runtime.Config{Development: dev}),
    },
})

Transform lowers Solid JSX; Runtime serves solid-js from the embedded copy so that no node_modules directory is required. Use Transform alone to keep resolving solid-js from disk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Plugins

func Plugins(opts solid.Options, cfg runtime.Config, embed bool) []esbuild.Plugin

Plugins returns the transform and, when embed is true, the embedded runtime.

func Runtime

func Runtime(cfg runtime.Config) esbuild.Plugin

Runtime returns a plugin that serves solid-js from the embedded copy, removing the need for a node_modules directory.

Both consumer code and the embedded modules themselves import bare specifiers such as "solid-js/web", so resolution is registered for the file namespace and for the plugin's own namespace.

func Transform

func Transform(opts solid.Options) esbuild.Plugin

Transform returns a plugin that lowers Solid JSX in every JSX and TSX file.

esbuild's own JSX transform is React-shaped and cannot produce Solid's template calls, so this must own every such file in the graph rather than just the entry point.

esbuild calls OnLoad concurrently across files. That is safe here: each call builds its own compiler state.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL