新一代打包工具(超基础,附代码超简单)

325 阅读1分钟

 mother-build

零成本上手,npm安装mother-build,也可通过yarn安装。

用法

配置项跟father-build类似,差异点是配置文件名:father-build是.fatherrc.js,而mother-build是.motherrc.js

配置示例

export default {    
    cjs: 'babel',    
    esm: { type: 'babel', importLibToEs: true },  
    runtimeHelpers: true,    
    extraBabelPlugins: [['babel-plugin-lodash']],  
    pkgs: ['xxx']
}

打包构建

运行mother-build指令即可