Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f5ccc0b2
authored
Jun 25, 2026
by
ccran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: VisActor多份bug;
parent
253ab02e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
web/classic/rsbuild.config.ts
+38
-0
No files found.
web/classic/rsbuild.config.ts
View file @
f5ccc0b2
...
...
@@ -11,6 +11,43 @@ const semiUiDir = path.resolve(
'../..'
,
)
const
semiUiDateFnsDir
=
path
.
resolve
(
semiUiDir
,
'node_modules/date-fns'
)
const
resolvePackageRoot
=
(
packageName
:
string
,
baseRequire
=
require
)
=>
{
let
current
=
path
.
dirname
(
baseRequire
.
resolve
(
packageName
))
while
(
current
!==
path
.
dirname
(
current
))
{
if
(
require
(
'fs'
).
existsSync
(
path
.
join
(
current
,
'package.json'
)))
{
return
current
}
current
=
path
.
dirname
(
current
)
}
return
current
}
const
vchartDir
=
resolvePackageRoot
(
'@visactor/vchart'
)
const
vchartRequire
=
createRequire
(
path
.
join
(
vchartDir
,
'package.json'
))
const
visactorChartAliases
=
Object
.
fromEntries
(
[
'@visactor/react-vchart'
,
'@visactor/vchart'
,
'@visactor/vchart-semi-theme'
,
'@visactor/vchart-theme-utils'
,
'@visactor/vrender-components'
,
'@visactor/vrender-core'
,
'@visactor/vrender-kits'
,
'@visactor/vdataset'
,
'@visactor/vscale'
,
'@visactor/vutils'
,
'@visactor/vutils-extension'
,
].
map
((
packageName
)
=>
[
packageName
,
resolvePackageRoot
(
packageName
,
packageName
===
'@visactor/react-vchart'
||
packageName
===
'@visactor/vchart-semi-theme'
||
packageName
===
'@visactor/vchart-theme-utils'
?
require
:
vchartRequire
,
),
]),
)
export
default
defineConfig
(({
envMode
})
=>
{
const
env
=
loadEnv
({
mode
:
envMode
,
prefixes
:
[
'VITE_'
]
})
...
...
@@ -49,6 +86,7 @@ export default defineConfig(({ envMode }) => {
'dist/css/semi.css'
,
),
'date-fns'
:
semiUiDateFnsDir
,
...
visactorChartAliases
,
},
},
html
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment