Skip to content

Commit

Permalink
fix: repaly gen components dts
Browse files Browse the repository at this point in the history
  • Loading branch information
CCherry07 committed Jul 26, 2024
1 parent 2453ca4 commit 87baa2f
Show file tree
Hide file tree
Showing 8 changed files with 6,075 additions and 286 deletions.
6 changes: 6 additions & 0 deletions packages/react-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @farmfe/plugin-react-components

## 1.0.4

### Patch Changes

- fix: repaly gen components dts

## 1.0.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@farmfe/plugin-react-components",
"version": "1.0.3",
"version": "1.0.4",
"private": false,
"main": "scripts/index.js",
"types": "scripts/index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions packages/react-components/playground/farm.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ export default defineConfig({
less(),
["@farmfe/plugin-react", { runtime: "automatic" }],
["@farmfe/plugin-react-components", {
dts: true,
local: true,
filename: "src/types/components.d.ts",
dirs:["src/components"],
resolvers: [
{
module: "antd",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
const ComponentE = () => {
import { Button } from "antd"

export const ComponentE = () => {
return <button>ComponentE</button>
}

const ComponentF = () => {
return <button>ComponentF</button>
}

export const ComponentG = () => {
return <Button>ComponentG</Button>
}
export {
ComponentE,
ComponentF
}

Expand Down
231 changes: 116 additions & 115 deletions packages/react-components/playground/src/types/components.d.ts

Large diffs are not rendered by default.

Loading

0 comments on commit 87baa2f

Please sign in to comment.