Wondering what’s next for npm?Check out our public roadmap! »

    babel-plugin-transform-dynamic-import

    2.1.0 • Public • Published

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

    Install

    npm i babel-plugin-transform-dynamic-import

    DownloadsWeekly Downloads

    82,592

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    145 kB

    Total Files

    10

    Last publish

    Collaborators

    • avatar