A @pika/pack build plugin. Adds a UMD distribution to your package, built to be flexible & run on legacy browsers & environments. If you're looking to build for web browsers and/or UNPKG, we recommend using
@pika/plugin-build-web
instead.
# npm:
npm install @pika/plugin-build-umd --save-dev
# yarn:
yarn add @pika/plugin-build-umd --dev
{
"name": "example-package-json",
"version": "1.0.0",
"@pika/pack": {
"pipeline": [
["@pika/plugin-standard-pkg"],
["@pika/plugin-build-umd"]
]
}
}
For more information about @pika/pack & help getting started, check out the main project repo.
-
"sourcemap"
(Default:"true"
): Adds a source map for this build. -
"name"
(Defaults: your package name): Sets the name that your package is attached to on thewindow
object. -
"entrypoint"
(Default:"umd:main"
): Customize the package.json manifest entrypoint set by this plugin. Accepts either a string, an array of strings, ornull
to disable entrypoint. Changing this is not recommended for most usage.
- Adds a UMD distribution to your built package:
dist-umd/index.js
- UMD Syntax
- All dependencies bundled with the package.
- Transpiled to run on all actively used and maintained browsers (excluding IE 11 and Opera Mini).
- Adds a "umd:main" entrypoint to your built
package.json
manifest.