mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -401,6 +401,7 @@ await Bun.build({
|
||||
format: "iife",
|
||||
})
|
||||
```
|
||||
|
||||
```bash#CLI
|
||||
$ bun build ./index.tsx --outdir ./out --format iife
|
||||
```
|
||||
@@ -430,6 +431,7 @@ await Bun.build({
|
||||
globalName: "MyLibrary",
|
||||
})
|
||||
```
|
||||
|
||||
```bash#CLI
|
||||
$ bun build ./index.tsx --outdir ./out --format iife --global-name MyLibrary
|
||||
```
|
||||
|
||||
6
packages/bun-types/bun.d.ts
vendored
6
packages/bun-types/bun.d.ts
vendored
@@ -1837,11 +1837,11 @@ declare module "bun" {
|
||||
|
||||
/**
|
||||
* Global variable name for IIFE format bundles.
|
||||
*
|
||||
*
|
||||
* When using `format: "iife"` with a `globalName`, the bundle will be
|
||||
* wrapped in an IIFE and the exported values will be assigned to a global
|
||||
* variable with the specified name.
|
||||
*
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
* await Bun.build({
|
||||
@@ -1851,7 +1851,7 @@ declare module "bun" {
|
||||
* outfile: './dist/library.js'
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
*
|
||||
* The `globalName` must be a valid JavaScript identifier.
|
||||
* This option is only meaningful when `format` is set to `"iife"`.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user