Skip to content

Commit e3720df

Browse files
authored
chore: Force single resolution for core modules, infinite loop guard (#18764)
1 parent 8a813a6 commit e3720df

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

packages/frontend-shared/src/graphql/urqlExchangeNamedRoute.ts

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ export const namedRouteExchange: Exchange = ({ client, forward }) => {
66
return forward(pipe(
77
ops$,
88
map((o) => {
9+
if (!o.context.url.endsWith('/graphql')) {
10+
throw new Error(`Infinite loop detected? Ping @tgriesser to help debug`)
11+
}
12+
913
return {
1014
...o,
1115
context: {

packages/frontend-shared/vite.config.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,21 @@ export const makeConfig = (config: Partial<UserConfig> = {}, plugins: PluginOpti
9595
},
9696
},
9797

98-
resolve: { alias },
98+
resolve: {
99+
alias,
100+
dedupe: [
101+
'vue',
102+
'@vue/compiler-core',
103+
'@vue/compiler-dom',
104+
'@vue/compiler-sfc',
105+
'@vueuse/core',
106+
'@urql/core',
107+
'@urql/devtools',
108+
'@urql/exchange-execute',
109+
'@urql/exchange-graphcache',
110+
'@urql/vue',
111+
],
112+
},
99113

100114
// You cannot add or remove arbitrary options from shared plugins.
101115
// Please use the PluginsOverride option for this.

0 commit comments

Comments
 (0)