mirror of
https://github.com/ant-design/pro-components.git
synced 2024-10-23 09:23:51 +08:00
3ef9283a4c
* chore: remove `@types/lodash-es` from peer dependencies * chore: add `lodash` and `@types/lodash` dependencies * chore: replace `lodash-es` imports with sub-path imports * fix(lodash-in-cjs): replace lodash-es imports in cjs builds with lodash
24 lines
896 B
TypeScript
24 lines
896 B
TypeScript
import { defineConfig } from 'father';
|
|
|
|
export default defineConfig({
|
|
// 以下为 esm 配置项启用时的默认值,有自定义需求时才需配置
|
|
esm: {
|
|
input: 'src', // 默认编译目录
|
|
output: 'es',
|
|
extraBabelPlugins: [[require.resolve('./scripts/replaceLib'), {}]],
|
|
platform: 'browser', // 默认构建为 Browser 环境的产物
|
|
transformer: 'babel', // 默认使用 babel 以提供更好的兼容性
|
|
},
|
|
// 以下为 cjs 配置项启用时的默认值,有自定义需求时才需配置
|
|
cjs: {
|
|
extraBabelPlugins: [
|
|
[require.resolve('./scripts/replaceEs'), {}],
|
|
[require.resolve('./scripts/replaceLodash'), {}],
|
|
],
|
|
input: 'src', // 默认编译目录
|
|
output: 'lib',
|
|
platform: 'browser', // 默认构建为 Node.js 环境的产物
|
|
transformer: 'babel', // 默认使用 esbuild 以获得更快的构建速度
|
|
},
|
|
});
|