@pika/plugin-build-umd
v0.9.2
Published
A @pika/pack plugin: Adds a UMD distribution to your package, built to be flexible & run on legacy browsers & environments.
Downloads
1,136
Readme
@pika/plugin-build-umd
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-webinstead.
Install
# npm:
npm install @pika/plugin-build-umd --save-dev
# yarn:
yarn add @pika/plugin-build-umd --devUsage
{
"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.
Options
"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 thewindowobject."entrypoint"(Default:"umd:main"): Customize the package.json manifest entrypoint set by this plugin. Accepts either a string, an array of strings, ornullto disable entrypoint. Changing this is not recommended for most usage.
Result
- 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.jsonmanifest.
