esbuild

package
v0.0.0-...-15592ba Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

esbuild contains code for transpiling and bundling TypeScript and JavaScript code.

Index

Constants

View Source
const (
	// SourceMapExt contains the suffix that esbuild appends to a file (e.g. "foo.js")
	// for its source map ("foo.js.map"). The source map should be served at this location
	// since the code contains a comment referencing it.
	SourceMapExt = ".map"
)

Variables

This section is empty.

Functions

func Bundle

func Bundle(dir string, entryPoints []string, outFile string, minify bool) (
	js, sourceMap []byte, err error)

Bundle builds the supplied files into a single ES module.

func Transform

func Transform(src []byte, loader api.Loader, minify bool, fn string) ([]byte, error)

Transform transforms the supplied code to an ES module. loader (api.LoaderTS or api.LoaderJS) describes src's language. If fn is supplied, it will be used as the filename in error messages.

Types

This section is empty.

Jump to

Keyboard shortcuts

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