Skip to content

Commit

Permalink
chore: update compile config
Browse files Browse the repository at this point in the history
  • Loading branch information
Barrior committed Jan 2, 2024
1 parent dd5d31e commit f7c2d81
Show file tree
Hide file tree
Showing 7 changed files with 304 additions and 153 deletions.
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"name": "root",
"private": true,
"workspaces": [
"packages/*"
],
"scripts": {
"dev": "yarn docs",
"build": "node scripts/build-cli.mjs",
Expand Down Expand Up @@ -54,7 +51,7 @@
"dayjs": "^1.11.0",
"dumi": "^2.2.7",
"execa": "^7.1.1",
"father": "^4.1.7",
"father": "^4.3.8",
"glob": "^10.0.0",
"husky": "^8.0.3",
"inquirer": "^9.1.5",
Expand Down
17 changes: 15 additions & 2 deletions packages/core-react/.fatherrc.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
import { defineConfig } from 'father';
import { defineConfig } from 'father'

export default defineConfig({
// more father config: https://github.com/umijs/father/blob/master/docs/config.md
esm: {
input: 'src',
output: 'dist/esm',
transformer: 'swc',
platform: 'node',
},
cjs: {
input: 'src',
output: 'dist/cjs',
transformer: 'swc',
platform: 'browser',
},
});
umd: {
name: 'SchemaRenderCore',
entry: {
'src/index': {},
},
output: 'dist/umd',
platform: 'browser',
externals: {
react: 'react',
},
},
})
3 changes: 2 additions & 1 deletion packages/core-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"module": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"files": [
"dist"
"dist/cjs",
"dist/esm"
],
"scripts": {
"build": "father build"
Expand Down
6 changes: 4 additions & 2 deletions packages/form-render-react/.fatherrc.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { defineConfig } from 'father';
import { defineConfig } from 'father'

export default defineConfig({
// more father config: https://github.com/umijs/father/blob/master/docs/config.md
esm: {
input: 'src',
output: 'dist/esm',
transformer: 'swc',
platform: 'node',
},
cjs: {
input: 'src',
output: 'dist/cjs',
transformer: 'swc',
platform: 'browser',
},
});
})
6 changes: 4 additions & 2 deletions packages/search-react/.fatherrc.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { defineConfig } from 'father';
import { defineConfig } from 'father'

export default defineConfig({
// more father config: https://github.com/umijs/father/blob/master/docs/config.md
esm: {
input: 'src',
output: 'dist/esm',
transformer: 'swc',
platform: 'node',
},
cjs: {
input: 'src',
output: 'dist/cjs',
transformer: 'swc',
platform: 'browser',
},
});
})
Loading

0 comments on commit f7c2d81

Please sign in to comment.