babel-plugin-transform-dynamic-import
Babel plugin to transpile import() to a deferred require(), for node
Last updated 7 years ago by timer .
MIT · Repository · Bugs · Original npm
$ cnpm install babel-plugin-transform-dynamic-import 
SYNC missed versions from official npm registry.

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

Via .babelrc (Recommended)

.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']
});

Current Tags

  • 2.1.0                                ...           latest (7 years ago)

1 Versions

  • 2.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (16)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org