Skip to content

Commit

Permalink
🔧 build: 支持 lib 模式构建
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jan 5, 2023
1 parent be2ac75 commit b1cae1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .fatherrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ import { defineConfig } from 'father';

export default defineConfig({
esm: { output: 'es' },
cjs: { output: 'lib', platform: 'browser' },
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
"license": "MIT",
"author": "arvinxx([email protected])",
"sideEffects": false,
"main": "es/index.js",
"main": "lib/index.js",
"module": "es/index.js",
"types": "es/index.d.ts",
"types": "lib/index.d.ts",
"files": [
"lib",
"es"
],
"scripts": {
Expand Down

0 comments on commit b1cae1c

Please sign in to comment.