Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Force single resolution for core modules, infinite loop guard #18764

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export const namedRouteExchange: Exchange = ({ client, forward }) => {
return forward(pipe(
ops$,
map((o) => {
if (!o.context.url.endsWith('/graphql')) {
throw new Error(`Infinite loop detected? Ping @tgriesser to help debug`)
}

return {
...o,
context: {
Expand Down
16 changes: 15 additions & 1 deletion packages/frontend-shared/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,21 @@ export const makeConfig = (config: Partial<UserConfig> = {}, plugins: PluginOpti
},
},

resolve: { alias },
resolve: {
alias,
dedupe: [
'vue',
'@vue/compiler-core',
'@vue/compiler-dom',
'@vue/compiler-sfc',
'@vueuse/core',
'@urql/core',
'@urql/devtools',
'@urql/exchange-execute',
'@urql/exchange-graphcache',
'@urql/vue',
],
},

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