bundler

package
v0.152.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NonNodeModuleReg = regexp.MustCompile(`^[^./]|^\.[^./]|^\.\.[^/]`) // Must not start with "/" or "./" or "../"

NonNodeModuleReg copied from https://github.com/egoist/tsup/blob/dev/src/esbuild/external.ts#L5

Functions

This section is empty.

Types

type Bundler

type Bundler struct {
	// contains filtered or unexported fields
}

func NewBundler

func NewBundler(config Config) *Bundler

func (*Bundler) Bundle

func (b *Bundler) Bundle() error

func (*Bundler) BundleAndWatch added in v0.94.0

func (b *Bundler) BundleAndWatch(ctx context.Context)

func (*Bundler) Watch added in v0.94.0

func (b *Bundler) Watch(ctx context.Context)

type Config

type Config struct {
	Name                  string
	Production            bool
	Logger                *zap.Logger
	AbsWorkingDir         string
	SkipWatchOnEntryPoint bool
	EntryPoints           []string
	WatchPaths            []*watcher.WatchPath
	IgnorePaths           []string
	OutFile               string
	OutDir                string
	OutExtension          map[string]string
	OnAfterBundle         func(buildErr error, rebuild bool) error
	OnWatch               func(paths []string)
}

Jump to

Keyboard shortcuts

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