babel-plugin-load-on-demand
v1.0.3
Published
按需加载的一个 babel 插件
Downloads
1
Readme
babel-plugin-load-on-demand
按需加载模块
安装
npm install babel-plugin-load-on-demand -d
实例
转换前
import { Dialog } from "@mc/mc-components/packages"
转换后
import Dialog from "@mc/mc-components/packages/Dialog"
用法
在你的 .babelrc
中添加如下代码块
{
"plugins": [["babel-plugin-load-on-demand", {"libraryName": "@mc/mc-components/packages"}]]
}