File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,6 +38,14 @@ const HELIX_OPTIMIZE_DEPS = [
3838 '@shared/transformer/oracle'
3939]
4040
41+ const VUE_DEDUPE_DEPS = [
42+ 'vue' ,
43+ '@vue/shared' ,
44+ '@vue/reactivity' ,
45+ '@vue/runtime-core' ,
46+ '@vue/runtime-dom'
47+ ]
48+
4149function aliasBufferEntrypoint ( config : any ) {
4250 config . resolve = config . resolve || { }
4351
@@ -53,6 +61,14 @@ function aliasBufferEntrypoint(config: any) {
5361 }
5462}
5563
64+ function dedupeVueRuntime ( config : any ) {
65+ config . resolve = config . resolve || { }
66+ config . resolve . dedupe = config . resolve . dedupe || [ ]
67+ config . resolve . dedupe = [
68+ ...new Set ( [ ...config . resolve . dedupe , ...VUE_DEDUPE_DEPS ] )
69+ ]
70+ }
71+
5672export default {
5773 'pages:extend' ( pages ) {
5874 const spotPage = pages . find ( ( page ) => page . name === TradePage . Spot )
@@ -97,6 +113,7 @@ export default {
97113 } ,
98114 'vite:extendConfig' ( config : any ) {
99115 aliasBufferEntrypoint ( config )
116+ dedupeVueRuntime ( config )
100117
101118 if ( isProduction ) {
102119 return
You can’t perform that action at this time.
0 commit comments