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

    babel-plugin-do-demand-loading

    0.0.2 • Public • Published

    babel-plugin-do-demand-loading

    diana 配套按需加载 babel 插件

    Usage

    npm install --save-dev babel-plugin-do-demand-loading
    

    .babelrc 配置如下即可生效:

    {
      "plugins": [
        ["on-demand-loading", {"library": "diana"}]
      ]
    }
    

    Principle

    import { equal } from 'diana'

    上述代码经过此插件转换后等同于下列代码,从而实现按需加载

    import equal from 'diana/lib/equal'

    按需加载实践

    Keywords

    none

    Install

    npm i babel-plugin-do-demand-loading

    DownloadsWeekly Downloads

    0

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    1.75 kB

    Total Files

    3

    Last publish

    Collaborators

    • avatar