Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWithConfig ¶ added in v1.1.3
func BuildWithConfig(cfg BuildConfig) error
BuildWithConfig this function will trigger a build using esbuild using similar simplified params to the middleware, however the output will be written to a local directory which is typically a public assets folder.
func BundlerWithConfig ¶
func BundlerWithConfig(cfg BundlerConfig) echo.MiddlewareFunc
BundlerWithConfig provide bundle files which are built on startup and stored in memory in the middleware
Types ¶
type BuildConfig ¶ added in v1.1.3
type BuildConfig struct {
EntryPoints []api.EntryPoint
Outdir string
InlineSourcemap bool
Define map[string]string
Format api.Format
// This will be invoked for a build and can be used to check errors/warnings
OnBuild FuncBuildResult
}
type BundlerConfig ¶
type BundlerConfig struct {
EntryPoints []string
Outfile string
InlineSourcemap bool
Define map[string]string
Format api.Format
// This will be invoked for a build and can be used to check errors/warnings
OnBuild FuncBuildResult
OnRequest FuncRequest
}
BundlerConfig asset bundler configuration which provides the bare minimum to keep things simple
type FuncBuildResult ¶
type FuncBuildResult func(result api.BuildResult, timeTaken time.Duration)
FuncBuildResult callback used to return result when bundling
Click to show internal directories.
Click to hide internal directories.