Skip to content

Import named export #9947

@lacherogwu

Description

@lacherogwu

Vue version

^3.3.11

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-882jdu?file=src%2FApp.vue

Steps to reproduce

  1. Export a component from an index.ts file with a named export
  2. Import that component in another component using import * as X from './some-index-file.ts'
  3. Use the component
<template>
  <X.Comp />
</template>

What is expected?

The components to render

What is actually happening?

App.vue:7 Uncaught TypeError: Cannot read properties of undefined (reading 'Id')
at Proxy._sfc_render (App.vue:7:24)
at renderComponentRoot (runtime-core.esm-bundler.js:870:16)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5972:46)
at ReactiveEffect.run (reactivity.esm-bundler.js:170:19)
at instance.update (runtime-core.esm-bundler.js:6103:16)
at setupRenderEffect (runtime-core.esm-bundler.js:6113:5)
at mountComponent (runtime-core.esm-bundler.js:5881:7)
at processComponent (runtime-core.esm-bundler.js:5835:9)
at patch (runtime-core.esm-bundler.js:5307:11)
at render2 (runtime-core.esm-bundler.js:6623:7)

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions