Skip to content

Commit

Permalink
fix: component path
Browse files Browse the repository at this point in the history
  • Loading branch information
CCherry07 committed Aug 25, 2024
1 parent 267beea commit 1588cdc
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 247 deletions.
2 changes: 1 addition & 1 deletion packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"scripts": {
"dev": "cargo watch -w src -s 'scripts/watch.sh'",
"bump": "npx changeset version",
"play": "cd playground && farm",
"play": "pnpm --filter playground dev",
"build": "farm-plugin-tools build --platform --cargo-name farmfe_plugin_react_components -p farmfe_plugin_react_components --release",
"prepublishOnly": "farm-plugin-tools prepublish"
},
Expand Down
244 changes: 122 additions & 122 deletions packages/react-components/playground/components.d.ts
Original file line number Diff line number Diff line change
@@ -1,146 +1,146 @@
/* generated by farmfe_plugin_react_components */
export {}
declare global {
const ComponentX: typeof import('./src/components/ComponentD')['ComponentX']
const ComponentE: typeof import('./src/components/ComponentE')['ComponentE']
const ComponentD: typeof import('./src/components/ComponentD')['default']
const ComponentG: typeof import('./src/components/ComponentE')['ComponentG']
const ComponentA: typeof import('./src/components/ComponentA')['default']
const ComponentE: typeof import('./src/components/ComponentE')['default']
const ComponentB: typeof import('./src/components/ComponentB')['ComponentB']
const ComponentF: typeof import('./src/components/ComponentE')['ComponentF']
const ComponentE: typeof import('./src/components/ComponentE')['ComponentE']
const ComponentX: typeof import('./src/components/ComponentD')['ComponentX']
const ComponentC: typeof import('./src/components/ComponentC')['ComponentC']
const ComponentG: typeof import('./src/components/ComponentE')['ComponentG']
const ComponentD: typeof import('./src/components/ComponentD')['default']
const ARadio: typeof import('@arco-design/web-react')['Radio']
const AntInput: typeof import('antd')['Input']
const AntWatermark: typeof import('antd')['Watermark']
const ATransfer: typeof import('@arco-design/web-react')['Transfer']
const AntDivider: typeof import('antd')['Divider']
const AntRow: typeof import('antd')['Row']
const ComponentF: typeof import('./src/components/ComponentE')['ComponentF']
const ComponentB: typeof import('./src/components/ComponentB')['ComponentB']
const AntSelect: typeof import('antd')['Select']
const Antnotification: typeof import('antd')['notification']
const AntGrid: typeof import('antd')['Grid']
const AntDescriptions: typeof import('antd')['Descriptions']
const Anttheme: typeof import('antd')['theme']
const AntSpace: typeof import('antd')['Space']
const AntTable: typeof import('antd')['Table']
const AMenu: typeof import('@arco-design/web-react')['Menu']
const AntResult: typeof import('antd')['Result']
const AConfigProvider: typeof import('@arco-design/web-react')['ConfigProvider']
const ATimeline: typeof import('@arco-design/web-react')['Timeline']
const AntAnchor: typeof import('antd')['Anchor']
const AMentions: typeof import('@arco-design/web-react')['Mentions']
const ANotification: typeof import('@arco-design/web-react')['Notification']
const ADrawer: typeof import('@arco-design/web-react')['Drawer']
const ASteps: typeof import('@arco-design/web-react')['Steps']
const AntButton: typeof import('antd')['Button']
const ATag: typeof import('@arco-design/web-react')['Tag']
const AntMenu: typeof import('antd')['Menu']
const ADescriptions: typeof import('@arco-design/web-react')['Descriptions']
const AntWatermark: typeof import('antd')['Watermark']
const AResizeBox: typeof import('@arco-design/web-react')['ResizeBox']
const ASwitch: typeof import('@arco-design/web-react')['Switch']
const ATable: typeof import('@arco-design/web-react')['Table']
const AntLayout: typeof import('antd')['Layout']
const AntUpload: typeof import('antd')['Upload']
const ABreadcrumb: typeof import('@arco-design/web-react')['Breadcrumb']
const AntCalendar: typeof import('antd')['Calendar']
const AIcon: typeof import('@arco-design/web-react')['Icon']
const AntPopover: typeof import('antd')['Popover']
const AntForm: typeof import('antd')['Form']
const AntBreadcrumb: typeof import('antd')['Breadcrumb']
const ABadge: typeof import('@arco-design/web-react')['Badge']
const AntSpin: typeof import('antd')['Spin']
const ATimePicker: typeof import('@arco-design/web-react')['TimePicker']
const AntCard: typeof import('antd')['Card']
const AModal: typeof import('@arco-design/web-react')['Modal']
const ASlider: typeof import('@arco-design/web-react')['Slider']
const AList: typeof import('@arco-design/web-react')['List']
const AntSwitch: typeof import('antd')['Switch']
const AntTree: typeof import('antd')['Tree']
const ACheckbox: typeof import('@arco-design/web-react')['Checkbox']
const ADropdown: typeof import('@arco-design/web-react')['Dropdown']
const ALink: typeof import('@arco-design/web-react')['Link']
const AntBadge: typeof import('antd')['Badge']
const AntCheckbox: typeof import('antd')['Checkbox']
const ARadio: typeof import('@arco-design/web-react')['Radio']
const ADivider: typeof import('@arco-design/web-react')['Divider']
const AAffix: typeof import('@arco-design/web-react')['Affix']
const AResult: typeof import('@arco-design/web-react')['Result']
const AntFlex: typeof import('antd')['Flex']
const AInputNumber: typeof import('@arco-design/web-react')['InputNumber']
const AntStatistic: typeof import('antd')['Statistic']
const AntAlert: typeof import('antd')['Alert']
const ACollapse: typeof import('@arco-design/web-react')['Collapse']
const AntModal: typeof import('antd')['Modal']
const AntTag: typeof import('antd')['Tag']
const ALayout: typeof import('@arco-design/web-react')['Layout']
const AntForm: typeof import('antd')['Form']
const ACalendar: typeof import('@arco-design/web-react')['Calendar']
const ATrigger: typeof import('@arco-design/web-react')['Trigger']
const ATree: typeof import('@arco-design/web-react')['Tree']
const AntSlider: typeof import('antd')['Slider']
const ATreeSelect: typeof import('@arco-design/web-react')['TreeSelect']
const AntLayout: typeof import('antd')['Layout']
const ATabs: typeof import('@arco-design/web-react')['Tabs']
const ABackTop: typeof import('@arco-design/web-react')['BackTop']
const AntTour: typeof import('antd')['Tour']
const AntDrawer: typeof import('antd')['Drawer']
const AButton: typeof import('@arco-design/web-react')['Button']
const AntSwitch: typeof import('antd')['Switch']
const AntTooltip: typeof import('antd')['Tooltip']
const AForm: typeof import('@arco-design/web-react')['Form']
const AGrid: typeof import('@arco-design/web-react')['Grid']
const APagination: typeof import('@arco-design/web-react')['Pagination']
const AntProgress: typeof import('antd')['Progress']
const AntRadio: typeof import('antd')['Radio']
const Antmessage: typeof import('antd')['message']
const ATable: typeof import('@arco-design/web-react')['Table']
const AntCollapse: typeof import('antd')['Collapse']
const Antnotification: typeof import('antd')['notification']
const AntPopconfirm: typeof import('antd')['Popconfirm']
const AColorPicker: typeof import('@arco-design/web-react')['ColorPicker']
const AUpload: typeof import('@arco-design/web-react')['Upload']
const ATypography: typeof import('@arco-design/web-react')['Typography']
const ATabs: typeof import('@arco-design/web-react')['Tabs']
const ASkeleton: typeof import('@arco-design/web-react')['Skeleton']
const AntTag: typeof import('antd')['Tag']
const AntTypography: typeof import('antd')['Typography']
const AInputNumber: typeof import('@arco-design/web-react')['InputNumber']
const AEmpty: typeof import('@arco-design/web-react')['Empty']
const AntTransfer: typeof import('antd')['Transfer']
const AWatermark: typeof import('@arco-design/web-react')['Watermark']
const AntRate: typeof import('antd')['Rate']
const ASpace: typeof import('@arco-design/web-react')['Space']
const ABadge: typeof import('@arco-design/web-react')['Badge']
const AntTable: typeof import('antd')['Table']
const AntCascader: typeof import('antd')['Cascader']
const AAvatar: typeof import('@arco-design/web-react')['Avatar']
const AIcon: typeof import('@arco-design/web-react')['Icon']
const ACard: typeof import('@arco-design/web-react')['Card']
const AInput: typeof import('@arco-design/web-react')['Input']
const APageHeader: typeof import('@arco-design/web-react')['PageHeader']
const Anttheme: typeof import('antd')['theme']
const AMessage: typeof import('@arco-design/web-react')['Message']
const AntSkeleton: typeof import('antd')['Skeleton']
const AResult: typeof import('@arco-design/web-react')['Result']
const APopconfirm: typeof import('@arco-design/web-react')['Popconfirm']
const AConfigProvider: typeof import('@arco-design/web-react')['ConfigProvider']
const AntRadio: typeof import('antd')['Radio']
const AForm: typeof import('@arco-design/web-react')['Form']
const AAnchor: typeof import('@arco-design/web-react')['Anchor']
const ANotification: typeof import('@arco-design/web-react')['Notification']
const AntAlert: typeof import('antd')['Alert']
const ABreadcrumb: typeof import('@arco-design/web-react')['Breadcrumb']
const AImage: typeof import('@arco-design/web-react')['Image']
const AntMentions: typeof import('antd')['Mentions']
const AntApp: typeof import('antd')['App']
const AntTooltip: typeof import('antd')['Tooltip']
const APopover: typeof import('@arco-design/web-react')['Popover']
const ALink: typeof import('@arco-design/web-react')['Link']
const AEmpty: typeof import('@arco-design/web-react')['Empty']
const AAlert: typeof import('@arco-design/web-react')['Alert']
const AntPagination: typeof import('antd')['Pagination']
const AntList: typeof import('antd')['List']
const AProgress: typeof import('@arco-design/web-react')['Progress']
const ASlider: typeof import('@arco-design/web-react')['Slider']
const AntDescriptions: typeof import('antd')['Descriptions']
const AntSegmented: typeof import('antd')['Segmented']
const AntEmpty: typeof import('antd')['Empty']
const AntTypography: typeof import('antd')['Typography']
const AntCarousel: typeof import('antd')['Carousel']
const AStatistic: typeof import('@arco-design/web-react')['Statistic']
const AMentions: typeof import('@arco-design/web-react')['Mentions']
const ADescriptions: typeof import('@arco-design/web-react')['Descriptions']
const APortal: typeof import('@arco-design/web-react')['Portal']
const ATooltip: typeof import('@arco-design/web-react')['Tooltip']
const AntTabs: typeof import('antd')['Tabs']
const ADrawer: typeof import('@arco-design/web-react')['Drawer']
const ACheckbox: typeof import('@arco-design/web-react')['Checkbox']
const AntDrawer: typeof import('antd')['Drawer']
const AntTimeline: typeof import('antd')['Timeline']
const ADatePicker: typeof import('@arco-design/web-react')['DatePicker']
const ATimeline: typeof import('@arco-design/web-react')['Timeline']
const AList: typeof import('@arco-design/web-react')['List']
const AntMenu: typeof import('antd')['Menu']
const AntCheckbox: typeof import('antd')['Checkbox']
const AntDivider: typeof import('antd')['Divider']
const AVerificationCode: typeof import('@arco-design/web-react')['VerificationCode']
const AntRate: typeof import('antd')['Rate']
const AWatermark: typeof import('@arco-design/web-react')['Watermark']
const ATransfer: typeof import('@arco-design/web-react')['Transfer']
const AntCol: typeof import('antd')['Col']
const ARate: typeof import('@arco-design/web-react')['Rate']
const AAffix: typeof import('@arco-design/web-react')['Affix']
const ASpin: typeof import('@arco-design/web-react')['Spin']
const ASwitch: typeof import('@arco-design/web-react')['Switch']
const AntBadge: typeof import('antd')['Badge']
const AModal: typeof import('@arco-design/web-react')['Modal']
const AResizeBox: typeof import('@arco-design/web-react')['ResizeBox']
const ASkeleton: typeof import('@arco-design/web-react')['Skeleton']
const AComment: typeof import('@arco-design/web-react')['Comment']
const AntBreadcrumb: typeof import('antd')['Breadcrumb']
const AntApp: typeof import('antd')['App']
const AntUpload: typeof import('antd')['Upload']
const AProgress: typeof import('@arco-design/web-react')['Progress']
const AntTour: typeof import('antd')['Tour']
const ATooltip: typeof import('@arco-design/web-react')['Tooltip']
const AAvatar: typeof import('@arco-design/web-react')['Avatar']
const AntPopconfirm: typeof import('antd')['Popconfirm']
const Antversion: typeof import('antd')['version']
const AAutoComplete: typeof import('@arco-design/web-react')['AutoComplete']
const AComment: typeof import('@arco-design/web-react')['Comment']
const AntTabs: typeof import('antd')['Tabs']
const AntList: typeof import('antd')['List']
const AntSlider: typeof import('antd')['Slider']
const APagination: typeof import('@arco-design/web-react')['Pagination']
const ACalendar: typeof import('@arco-design/web-react')['Calendar']
const AMessage: typeof import('@arco-design/web-react')['Message']
const AntImage: typeof import('antd')['Image']
const AInput: typeof import('@arco-design/web-react')['Input']
const ACascader: typeof import('@arco-design/web-react')['Cascader']
const ADropdown: typeof import('@arco-design/web-react')['Dropdown']
const ASteps: typeof import('@arco-design/web-react')['Steps']
const AUpload: typeof import('@arco-design/web-react')['Upload']
const AntSelect: typeof import('antd')['Select']
const AntDropdown: typeof import('antd')['Dropdown']
const ASpace: typeof import('@arco-design/web-react')['Space']
const APageHeader: typeof import('@arco-design/web-react')['PageHeader']
const ARate: typeof import('@arco-design/web-react')['Rate']
const AAlert: typeof import('@arco-design/web-react')['Alert']
const ACarousel: typeof import('@arco-design/web-react')['Carousel']
const AntImage: typeof import('antd')['Image']
const AAutoComplete: typeof import('@arco-design/web-react')['AutoComplete']
const AntAnchor: typeof import('antd')['Anchor']
const AntButton: typeof import('antd')['Button']
const AntStatistic: typeof import('antd')['Statistic']
const ATimePicker: typeof import('@arco-design/web-react')['TimePicker']
const AntCard: typeof import('antd')['Card']
const AntSpace: typeof import('antd')['Space']
const APopconfirm: typeof import('@arco-design/web-react')['Popconfirm']
const ADivider: typeof import('@arco-design/web-react')['Divider']
const AntModal: typeof import('antd')['Modal']
const AntPagination: typeof import('antd')['Pagination']
const AInputTag: typeof import('@arco-design/web-react')['InputTag']
const AntCollapse: typeof import('antd')['Collapse']
const ASelect: typeof import('@arco-design/web-react')['Select']
const AntTree: typeof import('antd')['Tree']
const AntCalendar: typeof import('antd')['Calendar']
const ASpin: typeof import('@arco-design/web-react')['Spin']
const ADatePicker: typeof import('@arco-design/web-react')['DatePicker']
const AntSegmented: typeof import('antd')['Segmented']
const ACard: typeof import('@arco-design/web-react')['Card']
const ATree: typeof import('@arco-design/web-react')['Tree']
const AntProgress: typeof import('antd')['Progress']
const AntCascader: typeof import('antd')['Cascader']
const AntRow: typeof import('antd')['Row']
const AntDropdown: typeof import('antd')['Dropdown']
const AntSkeleton: typeof import('antd')['Skeleton']
const AntSteps: typeof import('antd')['Steps']
const AntMentions: typeof import('antd')['Mentions']
const AntCarousel: typeof import('antd')['Carousel']
const AntGrid: typeof import('antd')['Grid']
const ATypography: typeof import('@arco-design/web-react')['Typography']
const AntPopover: typeof import('antd')['Popover']
const AInputTag: typeof import('@arco-design/web-react')['InputTag']
const AntAvatar: typeof import('antd')['Avatar']
const AntSpin: typeof import('antd')['Spin']
const ATreeSelect: typeof import('@arco-design/web-react')['TreeSelect']
const ALayout: typeof import('@arco-design/web-react')['Layout']
const AntAffix: typeof import('antd')['Affix']
const ATag: typeof import('@arco-design/web-react')['Tag']
const AImage: typeof import('@arco-design/web-react')['Image']
const Antmessage: typeof import('antd')['message']
const ATrigger: typeof import('@arco-design/web-react')['Trigger']
const AGrid: typeof import('@arco-design/web-react')['Grid']
const AntInput: typeof import('antd')['Input']
const AntResult: typeof import('antd')['Result']
const AColorPicker: typeof import('@arco-design/web-react')['ColorPicker']
const AntEmpty: typeof import('antd')['Empty']
const AntTimeline: typeof import('antd')['Timeline']
const AntAvatar: typeof import('antd')['Avatar']
const APortal: typeof import('@arco-design/web-react')['Portal']
}
2 changes: 1 addition & 1 deletion packages/react-components/playground/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
import { Main } from './main';
import { Main } from './test';
import './index.css'


Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/playground/src/test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{useState}from"react";import"./main.css";import FarmLogo from"./assets/logo.png";import reactLogo from"./assets/react.svg";import{ComponentF}from"./components/ComponentE.tsx";import{Space as AntSpace}from"antd";import{ComponentX}from"./components/ComponentD.tsx";import{ComponentC}from"./components/ComponentC.tsx";import{Button as AntButton}from"antd";import{ComponentB}from"./components/ComponentB.tsx";import ComponentE from"./components/ComponentE.tsx";import ComponentD from"./components/ComponentD.tsx";import ComponentA from"./components/ComponentA.tsx";export function Main(){const[count,setCount]=useState(0);console.log("rendering Main component");return(<>
import{useState}from"react";import"./main.css";import FarmLogo from"./assets/logo.png";import reactLogo from"./assets/react.svg";import{ComponentC}from"./components/ComponentC.tsx";import{ComponentX}from"./components/ComponentD.tsx";import{ComponentB}from"./components/ComponentB.tsx";import{Space as AntSpace}from"antd";import ComponentA from"./components/ComponentA.tsx";import{Button as AntButton}from"antd";import{ComponentF}from"./components/ComponentE.tsx";import ComponentD from"./components/ComponentD.tsx";import ComponentE from"./components/ComponentE.tsx";export function Main(){const[count,setCount]=useState(0);console.log("rendering Main component");return(<>
<div>
<a href="https://farmfe.org/"target="_blank">
<img src={FarmLogo}className="logo"alt="Farm logo"/>
Expand Down
Loading

0 comments on commit 1588cdc

Please sign in to comment.