build(dependencies): 更新 @xyflow 相关包并解决 JSX运行时问题

- 在 next.config.js 中添加 @xyflow/react 和 @xyflow/system 的模块路径
- 更新 package.json,添加 @xyflow/system 依赖
- 在 pnpm-lock.yaml 中更新 @xyflow/system 版本
- 解决 react/jsx-runtime 找不到的问题,通过添加别名路径
master
钟良源 5 months ago
parent 94afaea70a
commit 4680b1762c

@ -5,6 +5,8 @@ const withLess = require('next-with-less');
const withTM = require('next-transpile-modules')([ const withTM = require('next-transpile-modules')([
'@arco-design/web-react', '@arco-design/web-react',
'@arco-themes/react-arco-pro', '@arco-themes/react-arco-pro',
'@xyflow/react',
'@xyflow/system'
]); ]);
const setting = require("./src/settings.json"); const setting = require("./src/settings.json");
@ -29,6 +31,9 @@ module.exports = withLess(
'./src/public/assets' './src/public/assets'
); );
config.resolve.alias['@'] = path.resolve(__dirname, './src'); config.resolve.alias['@'] = path.resolve(__dirname, './src');
// 解决 react/jsx-runtime 找不到的问题
config.resolve.alias['react/jsx-runtime'] = path.resolve(__dirname, './node_modules/react/jsx-runtime.js');
config.resolve.alias['react/jsx-dev-runtime'] = path.resolve(__dirname, './node_modules/react/jsx-dev-runtime.js');
return config; return config;
}, },
@ -43,4 +48,4 @@ module.exports = withLess(
}, },
pageExtensions: ['tsx'], pageExtensions: ['tsx'],
}) })
); );

@ -18,6 +18,7 @@
"@loadable/component": "^5.13.2", "@loadable/component": "^5.13.2",
"@turf/turf": "^6.5.0", "@turf/turf": "^6.5.0",
"@xyflow/react": "^12.8.2", "@xyflow/react": "^12.8.2",
"@xyflow/system": "^0.0.68",
"axios": "^0.24.0", "axios": "^0.24.0",
"bizcharts": "^4.1.15", "bizcharts": "^4.1.15",
"classnames": "^2.3.1", "classnames": "^2.3.1",

@ -29,6 +29,9 @@ importers:
'@xyflow/react': '@xyflow/react':
specifier: ^12.8.2 specifier: ^12.8.2
version: 12.8.3(@types/react@17.0.2)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) version: 12.8.3(@types/react@17.0.2)(react-dom@17.0.2(react@17.0.2))(react@17.0.2)
'@xyflow/system':
specifier: ^0.0.68
version: 0.0.68
axios: axios:
specifier: ^0.24.0 specifier: ^0.24.0
version: 0.24.0 version: 0.24.0
@ -1552,6 +1555,9 @@ packages:
'@xyflow/system@0.0.67': '@xyflow/system@0.0.67':
resolution: {integrity: sha512-hYsmbj+8JDei0jmupBmxNLaeJEcf9kKmMl6IziGe02i0TOCsHwjIdP+qz+f4rI1/FR2CQiCZJrw4dkHOLC6tEQ==} resolution: {integrity: sha512-hYsmbj+8JDei0jmupBmxNLaeJEcf9kKmMl6IziGe02i0TOCsHwjIdP+qz+f4rI1/FR2CQiCZJrw4dkHOLC6tEQ==}
'@xyflow/system@0.0.68':
resolution: {integrity: sha512-QDG2wxIG4qX+uF8yzm1ULVZrcXX3MxPBoxv7O52FWsX87qIImOqifUhfa/TwsvLdzn7ic2DDBH1uI8TKbdNTYA==}
abs-svg-path@0.1.1: abs-svg-path@0.1.1:
resolution: {integrity: sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA==} resolution: {integrity: sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA==}
@ -6781,6 +6787,18 @@ snapshots:
d3-selection: 3.0.0 d3-selection: 3.0.0
d3-zoom: 3.0.0 d3-zoom: 3.0.0
'@xyflow/system@0.0.68':
dependencies:
'@types/d3-drag': 3.0.7
'@types/d3-interpolate': 3.0.4
'@types/d3-selection': 3.0.11
'@types/d3-transition': 3.0.9
'@types/d3-zoom': 3.0.8
d3-drag: 3.0.0
d3-interpolate: 3.0.1
d3-selection: 3.0.0
d3-zoom: 3.0.0
abs-svg-path@0.1.1: {} abs-svg-path@0.1.1: {}
acorn-import-phases@1.0.4(acorn@8.15.0): acorn-import-phases@1.0.4(acorn@8.15.0):

Loading…
Cancel
Save