0.1.0 • Published 2 years ago

k-fe-plugin-build-umd v0.1.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

k-fe-plugin-build-umd

打包组件为umd

Getting Started

1. 新增配置文件

新增.build-config.js 文件

2. 配置文件

module.exports = {}

导出内容类型参考:

interface IUmd {
  input?: string; // 'src/index.tsx'
  output: {
    file?: string;// 'umd/index.js',
    name: string; // 'material_window_variable_name'
  },
  globals?: Record<string, string>;// {react:'React'}
  external?: string[];// ['react','react-dom']
}

3. 打包

运行命令fe build-umd 进行umd打包