Skip to content

Commit d96bded

Browse files
committed
feat: 更新构建配置,支持ES模块和CommonJS输出
1 parent 7615ae5 commit d96bded

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.fatherrc.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ import { defineConfig } from 'father';
22

33
export default defineConfig({
44
// more father config: https://github.com/umijs/father/blob/master/docs/config.md
5-
esm: { output: 'dist', transformer: 'esbuild' },
5+
esm: { output: 'dist/es', transformer: 'esbuild' },
6+
cjs: { output: 'dist/lib', transformer: 'esbuild' },
67
});

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
"description": "类语雀的编辑器,支持 markdown 渲染和编辑",
55
"repository": "[email protected]:ant-design/md-editor.git",
66
"license": "MIT",
7-
"module": "dist/index.js",
8-
"types": "dist/index.d.ts",
7+
"main": "dist/lib/index.js",
8+
"module": "dist/es/index.js",
9+
"types": "dist/es/index.d.ts",
910
"files": [
1011
"dist"
1112
],

0 commit comments

Comments
 (0)