Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
func ScanBundle ¶
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 SourceMap bool ModuleName string ExtensionToLoader map[string]Loader OutputFormat Format // contains filtered or unexported fields }
type BundleResult ¶
type Format ¶
type Format uint8
const ( FormatNone Format = iota // IIFE stands for immediately-invoked function expression. That looks like // this: // // (() => { // ... bundled code ... // require(entryPoint); // })(); // // If the optional ModuleName is configured, then we'll write out this: // // let moduleName = (() => { // ... bundled code ... // return require(entryPoint); // })(); // FormatIIFE // The CommonJS format looks like this: // // ... bundled code ... // module.exports = require(entryPoint); // FormatCommonJS )
Click to show internal directories.
Click to hide internal directories.