chore: config site env

This commit is contained in:
Aaron 2024-05-11 21:44:21 +08:00
parent 68f1ed1e7c
commit cba1f59841
3 changed files with 14 additions and 4 deletions

View File

@ -1,6 +1,8 @@
// @ts-nocheck
if (window) {
window.g6 = require('@antv/g6/src');
window.g6 = require('@antv/g6');
window.g6Extension3d = require('@antv/g6-extension-3d');
window.g6ExtensionReact = require('@antv/g6-extension-react');
window.layoutGpu = require('@antv/layout-gpu');
window.algorithm = require('@antv/algorithm');
@ -14,9 +16,11 @@ if (window) {
window.gSvg = require('@antv/g-svg');
window.g2 = require('@antv/g2');
window.antd = require('antd');
window.icons = require('@ant-design/icons');
window.React = require('react');
window.ReactDOM = require('react-dom');
window.react = require('react');
window.React = window.react;
window.client = require('react-dom');
window.addPanel = async (renderPanel: (gui) => void) => {
const container = document.getElementById('container')?.parentNode;

View File

@ -492,6 +492,9 @@ export default defineConfig({
mfsu: false,
alias: {
'@': __dirname,
'@antv/g6': require.resolve('../g6/src/index.ts'),
'@antv/g6-extension-3d': require.resolve('../g6-extension-3d/src/index.ts'),
'@antv/g6-extension-react': require.resolve('../g6-extension-react/src/index.ts'),
},
links: [],
jsMinifier: 'terser',

View File

@ -36,13 +36,16 @@
"preview": "dumi preview"
},
"dependencies": {
"@ant-design/icons": "^5.3.6",
"@antv/algorithm": "^0.1.26",
"@antv/chart-node-g6": "^0.0.3",
"@antv/dumi-theme-antv": "^0.4.4",
"@antv/g": "^5.18.25",
"@antv/g-svg": "^1.10.28",
"@antv/g2": "^5.1.15",
"@antv/g2": "5.1.15",
"@antv/g6": "workspace:*",
"@antv/g6-extension-3d": "workspace:*",
"@antv/g6-extension-react": "workspace:*",
"@antv/graphlib": "^2.0.2",
"@antv/layout": "^1.2.14-beta.1",
"@antv/layout-gpu": "^1.1.5",