Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-dynamic-import-node

Package Overview
Dependencies
Maintainers
9
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-dynamic-import-node

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

  • 2.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.6M
decreased by-28.95%
Maintainers
9
Weekly downloads
 
Created

What is babel-plugin-dynamic-import-node?

The babel-plugin-dynamic-import-node package is a Babel plugin that transpiles the ECMAScript dynamic import() syntax to a deferred require() call. This transformation allows for code splitting and dynamic module loading in environments that do not natively support the import() syntax. It is particularly useful for server-side applications or tests running in Node.js where dynamic import is not available or practical.

What are babel-plugin-dynamic-import-node's main functionalities?

Transpile import() to require()

This feature allows developers to use the dynamic import() syntax in their code, which babel-plugin-dynamic-import-node will transpile into a deferred require() call. This enables dynamic module loading and code splitting in environments that do not support import() natively.

import('path/to/module').then(module => {\n  // Use module\n});

Other packages similar to babel-plugin-dynamic-import-node

Keywords

FAQs

Package last updated on 21 Apr 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc