JSPM

@paypal/connect-loader-component

0.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 37
    • Score
      100M100P100Q73240F
    • License MIT

    Loads AXO script

    Package Exports

    • @paypal/connect-loader-component
    • @paypal/connect-loader-component/dist/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@paypal/connect-loader-component) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    accelerated-checkout-loader

    Provides a static asset loader to fetch the latest PayPal Accelerated-Checkout components.

    Installation

    npm install -S @paypal/connect-loader-component

    Usage

    The minified accelerated-checkout-loader is available for most uses; in addition, an unminified accelerated-checkout-loader is available for development or testing.

    Minified

    Serves the minified version of the AXO script.

    import { loadAxo } from "@paypal/connect-loader-component";
    
    loadAxo({ minified: true })
      .then(() => {
        console.log("minified script loaded");
        return;
      })
      .catch((err) => {
        console.log("There was an error: ", err);
      });

    If no options are passed, the minified script is served by default

    import { loadAxo } from "@paypal/connect-loader-component";
    
    loadAxo()
      .then(() => {
        console.log("minified script loaded");
        return;
      })
      .catch((err) => {
        console.log("There was an error: ", err);
      });

    Unminified

    Serves the unminified version of the AXO script.

    import { loadAxo } from "@paypal/connect-loader-component";
    
    loadAxo({ minified: true })
      .then(() => {
        console.log("script loaded");
        return;
      })
      .catch((err) => {
        console.log("There was an error: ", err);
      });