package bundler
import "github.com/evanw/esbuild/internal/bundler"
Index ¶
- func DefaultExtensionToLoaderMap() map[string]Loader
- type Bundle
- func ScanBundle( log logging.Log, fs fs.FS, res resolver.Resolver, entryPaths []string, parseOptions parser.ParseOptions, bundleOptions BundleOptions, ) Bundle
- func (b *Bundle) Compile(log logging.Log, options BundleOptions) []BundleResult
- type BundleOptions
- type BundleResult
- type Loader
- type SourceMap
Functions ¶
func DefaultExtensionToLoaderMap ¶
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
func ScanBundle ¶
func ScanBundle( log logging.Log, fs fs.FS, res resolver.Resolver, entryPaths []string, parseOptions parser.ParseOptions, bundleOptions BundleOptions, ) Bundle
func (*Bundle) Compile ¶
func (b *Bundle) Compile(log logging.Log, options BundleOptions) []BundleResult
type BundleOptions ¶
type BundleOptions struct { // true: imports are scanned and bundled along with the file // false: imports are left alone and the file is passed through as-is IsBundling bool AbsOutputFile string AbsOutputDir string RemoveWhitespace bool MinifyIdentifiers bool MangleSyntax bool ModuleName string ExtensionToLoader map[string]Loader OutputFormat printer.Format SourceMap SourceMap SourceFile string // The "original file path" for the source map // If this isn't LoaderNone, all entry point contents are assumed to come // from stdin and must be loaded with this loader LoaderForStdin Loader // If true, make sure to generate a single file that can be written to stdout WriteToStdout bool // contains filtered or unexported fields }
type BundleResult ¶
type BundleResult struct { JsAbsPath string JsContents []byte SourceMapAbsPath string SourceMapContents []byte }
type Loader ¶
type Loader int
const ( LoaderNone Loader = iota LoaderJS LoaderJSX LoaderTS LoaderTSX LoaderJSON LoaderText LoaderBase64 LoaderDataURL )
type SourceMap ¶
type SourceMap uint8
const ( SourceMapNone SourceMap = iota SourceMapInline SourceMapLinkedWithComment SourceMapExternalWithoutComment )
Source Files ¶
bundler.go linker.go renamer.go
- Version
- v0.4.0
- Published
- May 26, 2020
- Platform
- windows/amd64
- Imports
- 20 packages
- Last checked
- 47 minutes ago –
Tools for package owners.