Socket
Socket
Sign inDemoInstall

babel-plugin-transform-dynamic-import

Package Overview
Dependencies
55
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-transform-dynamic-import

Babel plugin to transpile import() to a deferred require(), for node


Version published
Weekly downloads
39K
decreased by-3.7%
Maintainers
1
Install size
151 kB
Created
Weekly downloads
 

Changelog

Source

v2.1.0

  • [New] add noInterop option (#57)
  • [Docs] Fix typo "correct" -> "correctly" in readme (#55)
  • [Dev Deps] update airbnb-js-shims, babel-eslint, babel-preset-airbnb, eslint, eslint-config-airbnb-base, eslint-plugin-import, safe-publish-latest

Readme

Source

babel-plugin-transform-dynamic-import

Babel plugin to transpile import() to a deferred require(), for node. Matches the proposed spec.

NOTE: Babylon >= v6.12.0 is required to correct parse dynamic imports.

Installation

$ npm install babel-plugin-transform-dynamic-import --save-dev

Usage

.babelrc

{
  "plugins": ["transform-dynamic-import"]
}

Via CLI

$ babel --plugins transform-dynamic-import script.js

Via Node API

require('@babel/core').transform('code', {
  plugins: ['transform-dynamic-import']
});

Keywords

FAQs

Last updated on 24 Sep 2018

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