Skip to content

Commit 6f67ba7

Browse files
committed
fix: keep VRender external in VChart ES bundle
1 parent 543d940 commit 6f67ba7

8 files changed

Lines changed: 38 additions & 36 deletions

File tree

common/config/rush/pnpm-lock.yaml

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"@visactor/vchart-theme": "~1.6.6",
2020
"@visactor/vmind": "1.2.4-alpha.5",
2121
"@visactor/vutils": "~1.0.23",
22-
"@visactor/vrender": "^1.1.3",
23-
"@visactor/vrender-kits": "^1.1.3",
22+
"@visactor/vrender": "~1.1.3",
23+
"@visactor/vrender-kits": "~1.1.3",
2424
"@visactor/vtable": "1.19.0-alpha.0",
2525
"@visactor/vtable-editors": "1.19.0-alpha.0",
2626
"@visactor/vtable-gantt": "1.19.0-alpha.0",

packages/openinula-vchart/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"dependencies": {
3131
"@visactor/vchart": "workspace:2.1.1",
3232
"@visactor/vutils": "~1.0.23",
33-
"@visactor/vrender-core": "^1.1.3",
34-
"@visactor/vrender-kits": "^1.1.3",
33+
"@visactor/vrender-core": "~1.1.3",
34+
"@visactor/vrender-kits": "~1.1.3",
3535
"react-is": "^18.2.0"
3636
},
3737
"devDependencies": {

packages/react-vchart/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
"@visactor/vchart": "workspace:2.1.1",
3737
"@visactor/vchart-extension": "workspace:2.1.1",
3838
"@visactor/vutils": "~1.0.23",
39-
"@visactor/vrender-core": "^1.1.3",
40-
"@visactor/vrender-kits": "^1.1.3",
39+
"@visactor/vrender-core": "~1.1.3",
40+
"@visactor/vrender-kits": "~1.1.3",
4141
"react-is": "^18.2.0"
4242
},
4343
"devDependencies": {

packages/vchart-extension/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
"start": "ts-node __tests__/runtime/browser/scripts/initVite.ts && vite serve __tests__/runtime/browser"
2727
},
2828
"dependencies": {
29-
"@visactor/vrender-core": "^1.1.3",
30-
"@visactor/vrender-kits": "^1.1.3",
31-
"@visactor/vrender-components": "^1.1.3",
32-
"@visactor/vrender-animate": "^1.1.3",
29+
"@visactor/vrender-core": "~1.1.3",
30+
"@visactor/vrender-kits": "~1.1.3",
31+
"@visactor/vrender-components": "~1.1.3",
32+
"@visactor/vrender-animate": "~1.1.3",
3333
"@visactor/vchart": "workspace:2.1.1",
3434
"@visactor/vutils": "~1.0.23",
3535
"@visactor/vdataset": "~1.0.23",

packages/vchart/bundler.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const umdEntries = Object.keys(crossEnvs)
7070

7171
const multiEnvRuntimeEntries = new Set(['index-lark', 'index-wx', 'index-wx-simple', ...esEntries]);
7272
const factoryRegistryExternalId = '@visactor/vchart/esm/core/factory-registry';
73+
const vrenderExternalRE = /^@visactor\/vrender(?:-[^/]+)?(?:\/.*)?$/;
7374

7475
function isBrowserRuntimeEntry(entry) {
7576
const entryName = path.basename(entry, path.extname(entry));
@@ -120,6 +121,7 @@ module.exports = {
120121
plugins
121122
},
122123
esTotalRollupOptions: {
124+
external: id => vrenderExternalRE.test(id),
123125
prePlugins: [externalizeFactoryRegistryForEsTotal()]
124126
},
125127
nodeResolveOptions: entry =>

packages/vchart/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,11 @@
128128
"@visactor/vdataset": "~1.0.23",
129129
"@visactor/vscale": "~1.0.23",
130130
"@visactor/vlayouts": "~1.0.23",
131-
"@visactor/vrender": "^1.1.3",
132-
"@visactor/vrender-core": "^1.1.3",
133-
"@visactor/vrender-kits": "^1.1.3",
134-
"@visactor/vrender-components": "^1.1.3",
135-
"@visactor/vrender-animate": "^1.1.3",
131+
"@visactor/vrender": "~1.1.3",
132+
"@visactor/vrender-core": "~1.1.3",
133+
"@visactor/vrender-kits": "~1.1.3",
134+
"@visactor/vrender-components": "~1.1.3",
135+
"@visactor/vrender-animate": "~1.1.3",
136136
"@visactor/vutils-extension": "workspace:2.1.1"
137137
},
138138
"publishConfig": {

tools/story-player/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
"vite": "3.2.6"
5757
},
5858
"dependencies": {
59-
"@visactor/vrender-core": "^1.1.3",
60-
"@visactor/vrender-kits": "^1.1.3",
59+
"@visactor/vrender-core": "~1.1.3",
60+
"@visactor/vrender-kits": "~1.1.3",
6161
"@visactor/vchart": "workspace:2.1.1",
62-
"@visactor/vrender": "^1.1.3",
62+
"@visactor/vrender": "~1.1.3",
6363
"@visactor/vutils": "~1.0.23"
6464
}
6565
}

0 commit comments

Comments
 (0)