@pika/plugin-build-umd
TypeScript icon, indicating that this package has built-in type declarations

0.9.2 • Public • Published

@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-web instead.

Install

# npm:
npm install @pika/plugin-build-umd --save-dev
# yarn:
yarn add @pika/plugin-build-umd --dev

Usage

{
  "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 the window object.
  • "entrypoint" (Default: "umd:main"): Customize the package.json manifest entrypoint set by this plugin. Accepts either a string, an array of strings, or null to disable entrypoint. Changing this is not recommended for most usage.

Result

  1. Adds a UMD distribution to your built package: dist-umd/index.js
  2. UMD Syntax
  3. All dependencies bundled with the package.
  4. Transpiled to run on all actively used and maintained browsers (excluding IE 11 and Opera Mini).
  5. Adds a "umd:main" entrypoint to your built package.json manifest.

/@pika/plugin-build-umd/

    Package Sidebar

    Install

    npm i @pika/plugin-build-umd

    Weekly Downloads

    893

    Version

    0.9.2

    License

    MIT

    Unpacked Size

    15.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • fredkschott