question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Global components per-directory setting not working properly

See original GitHub issue

Environment

https://stackblitz.com/edit/nuxt-starter-qrjlf7?file=nuxt.config.ts,components%2Fcms%2FTest.vue,app.vue

Reproduction

https://stackblitz.com/edit/nuxt-starter-qrjlf7?file=nuxt.config.ts,components%2Fcms%2FTest.vue,app.vue

Describe the bug

Am I missing something or this configuration should work with component :is?

Check nuxt.config.ts and app.vue

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Rigo-mcommented, May 12, 2022

@danielroe makes complete sense. My mind worked like I was going to re-define props on a spreaded object.

1reaction
danielroecommented, May 12, 2022

The issue here is that Nuxt won’t re-add components that have already been added. Changing the config to this should solve the issue:

  import { defineNuxtConfig } from 'nuxt';
  // https://v3.nuxtjs.org/api/configuration/nuxt.config
  export default defineNuxtConfig({
    components: {
      dirs: [
-       '~/components',
        {
          global: true,
          path: '~/components/cms',
          prefix: 'Cms',
        },
+       '~/components',
      ],
    },
  })
Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug: is config.global.components ignored by testing-lib? #279
When adding the component directly to the global in the render() function it works, but not when setting it globally via config.global.
Read more >
My global Components are not available - Stack Overflow
My problem is that the store, where all the routes are saved,and all other components dont have access to the components i set...
Read more >
Using global components and configurations - IBM
This section describes how to create and manage global components and configurations in the Global Configuration Management application.
Read more >
PHP agent configuration | New Relic Documentation
The two scopes supported for New Relic settings are: SYSTEM: Values set globally in the global newrelic.ini file. PERDIR: Values set on a...
Read more >
Deep Separation of Direct and Global Components
Setup Calibration Details. This section describes the geometric and radiometric calibration of the co-axial projector-camera setup used for deep separation ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found