Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Reduce lowcoder-sdk initial bundle size#774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
e5ed589
setup webpack
raheeliftikhar5Mar 15, 2024
03cbba7
use antd/es
raheeliftikhar5Mar 15, 2024
7d87e4f
lazy load routes and components
raheeliftikhar5Mar 18, 2024
3ab149c
lazy load comps
raheeliftikhar5Mar 20, 2024
0d34edd
webpack configurations
raheeliftikhar5Mar 20, 2024
246a7ee
antd version fixed to 5.13.2
raheeliftikhar5Mar 20, 2024
7e85774
lazy load ant-design/icons
raheeliftikhar5Mar 25, 2024
3184cd3
lazy load ReactPlayer + ReactMarkdown
raheeliftikhar5Mar 25, 2024
df4f6ed
t sspecific imports instead of generic imports
raheeliftikhar5Mar 25, 2024
abd4e12
remove webpack bundling from lowcoder-sdk
raheeliftikhar5Mar 25, 2024
e02281a
added lowcoder-sdk-webpack-bundle workspace
raheeliftikhar5Mar 25, 2024
8d73f12
remove test package
raheeliftikhar5Mar 25, 2024
103152d
fix appEditor showing while loading issue
raheeliftikhar5Mar 27, 2024
2f72fac
fix small issue
raheeliftikhar5Mar 30, 2024
262667c
Merge branch 'dev' into lowcoder-sdk-webpack-bundle
FalkWolskyApr 1, 2024
33bd8f7
Update index.tsx
FalkWolskyApr 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletionsclient/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,7 +51,6 @@
"mq-polyfill": "^1.1.8",
"prettier": "^3.1.0",
"rimraf": "^3.0.2",
"rollup": "^2.79.0",
"shelljs": "^0.8.5",
"svgo": "^3.0.0",
"typescript": "^4.8.4",
Expand All@@ -75,11 +74,12 @@
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"@types/styled-components": "^5.1.34",
"antd-mobile": "^5.28.0",
"antd-mobile": "^5.34.0",
"chalk": "4",
"number-precision": "^1.6.0",
"react-player": "^2.11.0",
"resize-observer-polyfill": "^1.5.1",
"rollup": "^4.13.0",
"simplebar": "^6.2.5",
"tui-image-editor": "^3.15.3"
}
Expand Down
1 change: 1 addition & 0 deletionsclient/packages/lowcoder-comps/.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
/lib
/node_modules
/package
*.tgz
2 changes: 1 addition & 1 deletionclient/packages/lowcoder-comps/tsconfig.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es5",
"target": "ESNext",
"experimentalDecorators": true,
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import { App } from'antd';
import type { MessageInstance } from'antd/es/message/interface';
import type { ModalStaticFunctions } from'antd/es/modal/confirm';
import type { NotificationInstance } from'antd/es/notification/interface';
import {default asApp } from"antd/es/app";
import type { MessageInstance } from"antd/es/message/interface";
import type { ModalStaticFunctions } from"antd/es/modal/confirm";
import type { NotificationInstance } from"antd/es/notification/interface";

let messageInstance: MessageInstance;
let notificationInstance: NotificationInstance;
Expand Down
4 changes: 2 additions & 2 deletionsclient/packages/lowcoder-design/src/components/Trees.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import styled, { css } from "styled-components";
import { ReactComponent as Folded } from "icons/icon-folded.svg";
import { DataNode, TreeProps } from "antd/lib/tree";
import DirectoryTree from "antd/lib/tree/DirectoryTree";
import { DataNode, TreeProps } from "antd/es/tree";
import DirectoryTree from "antd/es/tree/DirectoryTree";

export const Treediv = styled.div<{ $height?: number }>`
padding-left: 24px;
Expand Down
8 changes: 5 additions & 3 deletionsclient/packages/lowcoder-design/src/components/audio.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
import { CSSProperties } from "react";
import { Ref } from "react";
importReactPlayer from "react-player";
import {lazy,Ref } from "react";
importtype {default as ReactPlayerType} from "react-player";
import styled from "styled-components";

const ReactPlayer = lazy(() => import("react-player"));

const Audio = styled(ReactPlayer)`
height: 32px !important;
`;
Expand All@@ -14,7 +16,7 @@ export function TacoAudio(props: {
onEnded?: () => void;
className?: string;
style?: CSSProperties;
audioRef?: Ref<ReactPlayer>;
audioRef?: Ref<ReactPlayerType>;
autoPlay?: boolean;
loop?: boolean;
}) {
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import { colord, extend } from "colord";
import namesPlugin from "colord/plugins/names";
import { generate } from "@ant-design/colors";
import { generate } from "@ant-design/colors/es";

extend([namesPlugin]);

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import type { IconDefinition } from "@fortawesome/free-regular-svg-icons";
// import type { IconDefinition as IconDefinitionBrands } from "@fortawesome/free-brands-svg-icons";
import { Popover } from "antd";
import { ActionType } from "@rc-component/trigger/lib/interface";
import {default asPopover } from "antd/lib/popover";
importtype{ ActionType } from "@rc-component/trigger/lib/interface";
import { TacoInput } from "components/tacoInput";
import { Tooltip } from "components/toolTip";
import { trans } from "i18n/design";
import_ from "lodash";
import{ upperFirst, sortBy } from "lodash";
import {
ReactNode,
useEffect,
useCallback,
useMemo,
useRef,
useState,
Suspense
} from "react";
import Draggable from "react-draggable";
import { default as List, ListRowProps } from "react-virtualized/dist/es/List";
import { default as List,typeListRowProps } from "react-virtualized/dist/es/List";
import styled from "styled-components";
import { CloseIcon, SearchIcon } from "icons";
import { ANTDICON } from "icons/antIcon";
import { Divider } from "antd-mobile";

const PopupContainer = styled.div`
width: 580px;
Expand DownExpand Up@@ -141,7 +141,7 @@ class Icon {
readonly title: string;
constructor(readonly def: IconDefinition | any, readonly names: string[]) {
if (def?.iconName) {
this.title = def.iconName.split("-").map(_.upperFirst).join(" ");
this.title = def.iconName.split("-").map(upperFirst).join(" ");
} else {
this.title = names[0].slice(5);
this.def = def;
Expand DownExpand Up@@ -231,7 +231,7 @@ function search(
.toLowerCase()
.split(/\s+/g)
.filter((t) => t);
return_.sortBy(
return sortBy(
Object.entries(allIcons).filter(([key, icon]) => {
if (icon.names.length === 0) {
return false;
Expand DownExpand Up@@ -297,7 +297,11 @@ const IconPopup = (props: {
onChangeIcon(key);
}}
>
<IconWrapper>{icon.getView()}</IconWrapper>
<IconWrapper>
<Suspense fallback={null}>
{icon.getView()}
</Suspense>
</IconWrapper>
<IconKeyDisplay>{key}</IconKeyDisplay>
</IconItemContainer>
</Tooltip>
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
import { css } from "styled-components";
import ReactMarkdown from "react-markdown";
import { lazy } from "react";
// import ReactMarkdown from "react-markdown";
import rehypeRaw from "rehype-raw";
import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
import remarkGfm from "remark-gfm";
import { ReactMarkdownOptions } from "react-markdown/lib/react-markdown";
import type { ReactMarkdownOptions } from "react-markdown/lib/react-markdown";

const ReactMarkdown = lazy(() => import('react-markdown'));

export const markdownCompCss = css`
.markdown-body {
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import styled, { css } from "styled-components";
import { default as Alert } from "antd/es/alert";
import { ReactNode } from "react";
import { AlertProps } from "antd/lib/alert";
import { AlertProps } from "antd/es/alert";
import { ToolTipLabel } from "./toolTip";
import { DocLink } from "components/ExternalLink";

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
import ReactPlayer from "react-player";
// import ReactPlayer from "react-player";
import { lazy } from 'react';
import styled from "styled-components";
import { videoPlayTriangle } from "icons";

const ReactPlayer = lazy(() => import("react-player"));

export const Video = styled(ReactPlayer)`
height: 100% !important;
width: 100% !important;
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp