Socket
Socket
Sign inDemoInstall

ui5-shim-babel-polyfill

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ui5-shim-babel-polyfill

Custom UI5 project shim extension for babel polyfill dependencies


Version published
Maintainers
1
Install size
1.49 MB
Created

Readme

Source

ui5-shim-babel-polyfill

Custom UI5 project shim extension for babel polyfill dependencies.

As of Babel 7.4.0, @babel/polyfill has been deprecated in favor of directly including core-js/stable (to polyfill ECMAScript features) and regenerator-runtime/runtime (needed to use transpiled generator functions).

Using this project shim both dependencies can be easily consumed in your ui5 application.

This is especially useful when using ui5-task-babel or ui5-middleware-babel.

Prerequisites

Make sure your project is using the latest UI5 Tooling.

Getting started

Install

Custom project shim

Add the custom project shim and its peer dependencies as dependencies to your project.

With yarn:

yarn add ui5-shim-babel-polyfill core-js-bundle regenerator-runtime

Or npm:

npm i ui5-shim-babel-polyfill core-js-bundle regenerator-runtime

Additionally the custom project shim its peer dependencies need to be manually defined in ui5.dependencies in your project's package.json:

{
  "ui5": {
    "dependencies": [
      "ui5-shim-babel-polyfill",
      "core-js-bundle",
      "regenerator-runtime"
    ]
  }
}

Usage

Register core-js/stable and regenerator-runtime/runtime as resources your projects manifest.json.

This will ensure both dependencies will be included once in your app and all required polyfills will be available for your transpiled code.

{
  "sap.ui5": {
    "resources": {
      "js": [
        {
          "uri": "/resources/core-js-bundle/minified.js"
        },
        {
          "uri": "/resources/regenerator-runtime/runtime.js"
        }
      ]
    }
  }
}

FAQs

Last updated on 13 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc