Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 948 Bytes

README.md

File metadata and controls

42 lines (32 loc) · 948 Bytes

babel-plugin-demand-loading

version MIT PRs Welcome


下载支持

支持babel6、babel7

babel6 1.x.x

npm install babel-plugin-demand-loading@1 --save-dev

babel7 2.x.x

npm install babel-plugin-demand-loading@2 --save-dev

使用说明

// e.g.
// .babelrc
"plugins": [
    [
      "babel-plugin-demand-loading",
      {
        "library": "yournpm"
      },
      "syntax-decorators"
    ],
  ]
  
// index.js
import { helloworld } from 'yournpm';

      ↓ ↓ ↓ ↓ ↓ ↓

var _helloworld = require('yournpm/helloworld');
import {fromat} from 'yournpm';