Skip to content

Commit

Permalink
fail on circular dependencies that are caused by our code
Browse files Browse the repository at this point in the history
CMK-19654

Change-Id: Ia4cbdb6468d7e71d669ed691068bc25cb18f2ce1
  • Loading branch information
BenediktSeidl authored and cellador committed Nov 18, 2024
1 parent df3e457 commit 85e926b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/cmk-frontend-vue/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,16 @@ export default defineConfig(({ command }) => {
rollupOptions: {
onwarn: function (message: string | RollupLog) {
if (typeof message === 'object') {
console.warn(message.message)
if (message.code === 'CIRCULAR_DEPENDENCY') {
// TODO: resolve them, and enable this CMK-19654
return
const external_circular_dependency = message.ids!.filter((id) =>
id.includes('/node_modules/')
)
if (external_circular_dependency.length === message.ids!.length) {
// its a circular dependency completely in node_modules folder, so we ignore it
return
}
}
console.warn(message.message)
} else {
console.warn(message)
}
Expand Down

0 comments on commit 85e926b

Please sign in to comment.