#Component PathPrefix

2 messages · Page 1 of 1 (latest)

civic sundial
#

I've disabled path prefix on components by disabling it in the nuxt.config.ts like so:

components: [{
  path: '~/src/components',
  pathPrefix: false,
}]

But whenever I go to use the component located in src/components/Box.vue I get failed to resolve component.

add path prefix back to true fixes the issue.

I can't seem to figure out why whenever I disable pathPrefix like I want it suddenly doesn't know where the component is.

civic sundial
#

So just randomly trying things out out of the docs, I got it to work by doing the following:

  components: [{
    path: '~/src/components',
    pathPrefix: false
  },
    '~/components'
  ]