Skip to content

Components mapped via mdc.components.map are not rendered correctly in build #3681

@maximepvrt

Description

@maximepvrt

Environment

x

Version

v3.10.0

Reproduction

https://stackblitz.com/~/github.com/maximepvrt/github-51sgreqg?file=content/index.md

https://github.com/maximepvrt/github-51sgreqg

Description

When using component mapping like this:

mdc: {
  components: {
    map: {
      button: 'ProseButton'
    }
  }
}

the mapping works in dev: :button is transformed into <ProseButton>.

Problem:
During the build, the mapping is not ignored, but <ProseButton> is injected as-is into the DOM without rendering the actual Vue component template.

Workaround:
If the component file is renamed with .global in the components folder:

app/components/content/ProseButton.global.vue

linked to #3656 ?

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions