Skip to content

Commit 7187475

Browse files
committed
fix: 关闭mfsu
1 parent 99ee03a commit 7187475

File tree

10 files changed

+22
-39
lines changed

10 files changed

+22
-39
lines changed

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
registry=https://registry.npmmirror.com
33
# pnpm
44
auto-install-peers=true
5-
git-checks=false
5+
git-checks=false
6+
# public-hoist-pattern[]=*

packages/gi-assets-advance/src/components/AnalysisHistory/TemplateModal.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { useContext } from '@antv/gi-sdk';
2-
import { createUuid } from '@antv/gi-sdk/lib/process/common';
1+
import { useContext, utils } from '@antv/gi-sdk';
32
import * as React from 'react';
43
import { useImmer } from 'use-immer';
54
import { CheckCircleFilled, PictureOutlined } from '@ant-design/icons';
@@ -87,8 +86,8 @@ const TemplateModal: React.FC<TemplateModalProps> = props => {
8786
updateState(draft => {
8887
draft.configuring = undefined;
8988
draft.graphData = {
90-
id: createUuid(),
91-
name: createUuid(),
89+
id: utils.createUuid(),
90+
name: utils.createUuid(),
9291
nodes,
9392
edges: [
9493
{
@@ -123,8 +122,8 @@ const TemplateModal: React.FC<TemplateModalProps> = props => {
123122
updateState(draft => {
124123
draft.configuring = undefined;
125124
draft.graphData = {
126-
id: createUuid(),
127-
name: createUuid(),
125+
id: utils.createUuid(),
126+
name: utils.createUuid(),
128127
nodes,
129128
edges,
130129
};

packages/gi-assets-basic/src/components/LayoutSwitch/Component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { GILayoutConfig, IGIAC } from '@antv/gi-sdk';
22
import { Icon, extra, useContext, utils } from '@antv/gi-sdk';
3-
import { LayoutConfig } from '@antv/gi-sdk/lib/typing';
3+
import type { LayoutConfig } from '@antv/gi-sdk';
44
import { Card, Popover, Radio, Space } from 'antd';
55
import React, { useEffect, useMemo } from 'react';
66

packages/gi-sdk/src/GISDK.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { GraphInsightContext } from './context';
99
import getComponents from './hooks/useComponents';
1010
import './index.less';
1111
import * as utils from './process';
12-
import { createUuid } from './process/common';
1312
import { registerLayouts, registerShapes } from './register';
1413
import type { GIComponentConfig, GIGraphData, Props, State } from './typing';
1514

@@ -337,7 +336,7 @@ const GISDK = (props: Props) => {
337336
// @ts-ignore
338337
draft.history = (draft.history || []).concat([
339338
{
340-
id: createUuid(),
339+
id: utils.createUuid(),
341340
timestamp: time,
342341
...param,
343342
},

packages/gi-sdk/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export type {
5858
GraphSchemaData,
5959
ISourceDataMap,
6060
ServiceObject,
61+
LayoutConfig,
6162
} from './typing';
6263
export { extra, template, useContext, utils, version };
6364

packages/gi-sdk/src/process/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export {
1313
mergeObjectByRule,
1414
time,
1515
uniqueElementsBy,
16+
createUuid,
1617
} from './common';
1718
export { filterByRules } from './filterByRules';
1819
export { findAllPath, getNeighbors } from './findAllPath';

packages/gi-site/.umirc.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ const EXTRA_CONFIG = isDev
4141
'react-dom': 'ReactDOM',
4242
antd: 'antd',
4343
},
44-
scripts: [
45-
'https://gw.alipayobjects.com/os/lib/react/18.2.0/umd/react.production.min.js',
46-
'https://gw.alipayobjects.com/os/lib/react-dom/18.2.0/umd/react-dom.production.min.js',
47-
'https://gw.alipayobjects.com/os/lib/antd/4.24.8/dist/antd.min.js',
48-
],
44+
scripts: ['https://gw.alipayobjects.com/os/lib/antd/4.24.8/dist/antd.min.js'],
4945
links: [],
5046
}
5147
: {
@@ -83,6 +79,8 @@ export default {
8379
"window.dataLayer = window.dataLayer || [];function gtag() {dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-9Z6Z0NTLFB');",
8480
"window.TracertCmdCache = window.TracertCmdCache || [];var t = window.Tracert || {_isRenderInit: !0,call: function () {window.TracertCmdCache.push(arguments);},},f = ['call','start','config','logPv','info','err','click','expo','pageName','pageState','time','timeEnd','parse','checkExpo','stringify','report','set','before'];for (let i = 0; i < f.length; i++) {(function (fn) {t[fn] = function () {var a = [],l = arguments.length;for (var j = 0; j < l; j++) {a.push(arguments[j]);}a.unshift(fn);window.TracertCmdCache.push(a);};})(f[i]);}window.Tracert = t;window._to = window._to || {};function filterLog(logType) {return function (opts) {return !!window.GI_USER_INFO?.outUserNo;};}window.Tracert.call('before', 'logPv', filterLog('PageMonitor'));window.Tracert.call('before', 'expo', filterLog('expo'));window.Tracert.call('before', 'click', filterLog('click'));",
8581
'https://ur.alipay.com/tracert_a3220.js',
82+
'https://gw.alipayobjects.com/os/lib/react/18.2.0/umd/react.production.min.js',
83+
'https://gw.alipayobjects.com/os/lib/react-dom/18.2.0/umd/react-dom.production.min.js',
8684
],
8785
publicPath: BUILD_MODE === 'docker' ? '/public/' : '/',
8886
hash: true,
@@ -92,7 +90,6 @@ export default {
9290
},
9391
alias: {
9492
'@': './src',
95-
// '@antv/gi-sdk': '../gi-sdk/src',
9693
},
9794
routes: [
9895
{ exact: true, path: '', redirect: '/home' },
@@ -212,13 +209,10 @@ export default {
212209
request: {
213210
dataField: '',
214211
},
215-
fastRefresh: true,
216-
mfsu: {
217-
// exclude: ['@antv/*', '@alipay/*'],
218-
// strategy: 'eager',
219-
},
212+
mfsu: false,
220213
// monorepoRedirect: {
221-
// srcDir: ['src'],
214+
// srcDir: ['.', 'src'],
215+
// exclude: [/^(?!@alipay|@antv).*/],
222216
// },
223217
// analyze: {
224218
// analyzerMode: 'server',

packages/gi-site/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@types/classnames": "^2.2.9",
4949
"@types/node": "^7.0.12",
5050
"@types/systemjs": "latest",
51+
"@umijs/max": "^4.0.0",
5152
"ahooks": "^2.10.9",
5253
"classnames": "^2.2.6",
5354
"d3-scale": "^4.0.0",
@@ -65,7 +66,6 @@
6566
"react-monaco-editor": "^0.48.0",
6667
"swr": "^1.2.2",
6768
"systemjs": "^6.11.0",
68-
"@umijs/max": "^4.0.0",
6969
"umi": "^4.0.0",
7070
"umi-request": "^1.3.9",
7171
"use-immer": "^0.7.0",
@@ -80,8 +80,8 @@
8080
"peerDependencies": {
8181
"@antv/graphin": "^2.7.15",
8282
"antd": "4.x",
83-
"react": "17.x",
84-
"react-dom": "17.x"
83+
"react": "18.x",
84+
"react-dom": "18.x"
8585
},
8686
"publishConfig": {
8787
"access": "public"

packages/gi-site/scripts/pre-build.mjs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,6 @@ const depsPackage = [
4242
global: 'localforage',
4343
name: 'localforage',
4444
},
45-
{
46-
url: 'https://gw.alipayobjects.com/os/lib/react/18.2.0/umd/react.production.min.js',
47-
version: '18.2.0',
48-
global: 'React',
49-
name: 'react',
50-
},
51-
{
52-
url: 'https://gw.alipayobjects.com/os/lib/react-dom/18.2.0/umd/react-dom.production.min.js',
53-
name: 'react-dom',
54-
version: '18.2.0',
55-
global: 'ReactDOM',
56-
},
5745
{
5846
url: 'https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js',
5947
name: 'lodash',

packages/gi-site/src/components/Navbar/ExportSdk.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ const SdkContent = () => {
5454
data: { transData: data },
5555
},
5656
deps: {
57-
react: '17.x',
58-
'react-dom': '17.x',
57+
react: '18.x',
58+
'react-dom': '18.x',
5959
localforage: '1.10.0',
6060
antd: ANTD_VERSION,
6161
'@antv/gi-theme-antd': GI_THEME_ANTD_VERSION,

0 commit comments

Comments
 (0)