@gr2m/pika-plugin-bundle-web
A @pika/pack plugin: Adds a bundled Web distribution to your package, built & optimized to run in most web browsers (and bundlers).
Last updated 7 months ago by gr2m .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @gr2m/pika-plugin-bundle-web 
SYNC missed versions from official npm registry.

@pika/plugin-bundle-web

A @pika/pack build plugin. Adds a bundled Web distribution to your package, built & optimized to run in most web browsers (and bundlers). Useful for hosting on a CDN like UNPKG and/or when package dependencies aren't written to run natively on the web.

Install

# npm:
npm install @pika/plugin-bundle-web --save-dev
# yarn:
yarn add @pika/plugin-bundle-web --dev

Usage

{
  "name": "example-package-json",
  "version": "1.0.0",
  "@pika/pack": {
    "pipeline": [
      ["@pika/plugin-standard-pkg"],
      ["@pika/plugin-build-web"],
      ["@pika/plugin-bundle-web", { /* options (optional) */ }]
    ]
  }
}

For more information about @pika/pack & help getting started, check out the main project repo.

Options

  • "browser" (Default: false): If true, this plugin will respect the "browser" field in bundled dependencies over the usual "main" Node-specific entrypoint. This may be required for some dependencies, but may cause problems with others. YMMV.

Result

  1. Adds a web bundled distribution to your built package: dist-web/index.bundled.js
  2. ES Module (ESM) Syntax
  3. Transpiled to run on all browsers where ES Module syntax is supported.
  4. All dependencies inlined into this file.

Note that this does not add or modify the "module" entrypoint to your package.json. Bundles should continue to use the "module" entrypoint, while this build can be loaded directly in the browser (from a CDN like UNPKG).

Current Tags

  • 0.3.16-patch-issue-46-6                                ...           latest (7 months ago)

7 Versions

Maintainers (1)
Downloads
Today 0
This Week 7
This Month 7
Last Day 7
Last Week 21
Last Month 70
Dependencies (5)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |